diff options
author | Koen Kooi <koen@openembedded.org> | 2010-05-03 15:49:48 +0200 |
---|---|---|
committer | Koen Kooi <koen@openembedded.org> | 2010-05-03 15:50:19 +0200 |
commit | 5f38959851ea1319ebbeb0cd7921e15c62495ee0 (patch) | |
tree | 39272142350729e0025adbccf55712d014b0cf9b /recipes | |
parent | cb6413fb247176543185a6eabd9a476697251298 (diff) |
linux-omap-psp 2.6.32: sync patches with validation kernel
Diffstat (limited to 'recipes')
-rw-r--r-- | recipes/linux/linux-omap-psp-2.6.32/0043-ARM-OMAP-beagleboard-Add-infrastructure-to-do-fixups.patch | 172 | ||||
-rw-r--r-- | recipes/linux/linux-omap-psp_2.6.32.bb | 1 |
2 files changed, 173 insertions, 0 deletions
diff --git a/recipes/linux/linux-omap-psp-2.6.32/0043-ARM-OMAP-beagleboard-Add-infrastructure-to-do-fixups.patch b/recipes/linux/linux-omap-psp-2.6.32/0043-ARM-OMAP-beagleboard-Add-infrastructure-to-do-fixups.patch new file mode 100644 index 0000000000..76af18ca7d --- /dev/null +++ b/recipes/linux/linux-omap-psp-2.6.32/0043-ARM-OMAP-beagleboard-Add-infrastructure-to-do-fixups.patch @@ -0,0 +1,172 @@ +From b6238a79746a5022969a5f780a6e51d794ab9c0c Mon Sep 17 00:00:00 2001 +From: Koen Kooi <koen@dominion.thruhere.net> +Date: Mon, 3 May 2010 14:41:29 +0200 +Subject: [PATCH 43/43] ARM: OMAP: beagleboard: Add infrastructure to do fixups based on expansionboard name passed by u-boot + +And add support for zippy2 +--- + arch/arm/mach-omap2/board-omap3beagle.c | 88 +++++++++++++++++++++++++++---- + 1 files changed, 78 insertions(+), 10 deletions(-) + +diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c +index 8dfb864..cb2c9c8 100644 +--- a/arch/arm/mach-omap2/board-omap3beagle.c ++++ b/arch/arm/mach-omap2/board-omap3beagle.c +@@ -75,6 +75,8 @@ static struct omap_opp * _omap37x_l3_rate_table = NULL; + + #define NAND_BLOCK_SIZE SZ_128K + ++char expansionboard_name[16]; ++ + #if defined(CONFIG_ENC28J60) || defined(CONFIG_ENC28J60_MODULE) + + #include <plat/mcspi.h> +@@ -87,7 +89,7 @@ static struct omap2_mcspi_device_config enc28j60_spi_chip_info = { + .single_channel = 1, /* 0: slave, 1: master */ + }; + +-static struct spi_board_info omap3beagle_spi_board_info[] __initdata = { ++static struct spi_board_info omap3beagle_zippy_spi_board_info[] __initdata = { + { + .modalias = "enc28j60", + .bus_num = 4, +@@ -102,21 +104,62 @@ static void __init omap3beagle_enc28j60_init(void) + if ((gpio_request(OMAP3BEAGLE_GPIO_ENC28J60_IRQ, "ENC28J60_IRQ") == 0) && + (gpio_direction_input(OMAP3BEAGLE_GPIO_ENC28J60_IRQ) == 0)) { + gpio_export(OMAP3BEAGLE_GPIO_ENC28J60_IRQ, 0); +- omap3beagle_spi_board_info[0].irq = OMAP_GPIO_IRQ(OMAP3BEAGLE_GPIO_ENC28J60_IRQ); +- set_irq_type(omap3beagle_spi_board_info[0].irq, IRQ_TYPE_EDGE_FALLING); ++ omap3beagle_zippy_spi_board_info[0].irq = OMAP_GPIO_IRQ(OMAP3BEAGLE_GPIO_ENC28J60_IRQ); ++ set_irq_type(omap3beagle_zippy_spi_board_info[0].irq, IRQ_TYPE_EDGE_FALLING); + } else { + printk(KERN_ERR "could not obtain gpio for ENC28J60_IRQ\n"); + return; + } + +- spi_register_board_info(omap3beagle_spi_board_info, +- ARRAY_SIZE(omap3beagle_spi_board_info)); ++ spi_register_board_info(omap3beagle_zippy_spi_board_info, ++ ARRAY_SIZE(omap3beagle_zippy_spi_board_info)); + } + + #else + static inline void __init omap3beagle_enc28j60_init(void) { return; } + #endif + ++#if defined(CONFIG_KS8851) || defined(CONFIG_KS8851_MODULE) ++ ++#include <plat/mcspi.h> ++#include <linux/spi/spi.h> ++ ++#define OMAP3BEAGLE_GPIO_KS8851_IRQ 157 ++ ++static struct omap2_mcspi_device_config ks8851_spi_chip_info = { ++ .turbo_mode = 0, ++ .single_channel = 1, /* 0: slave, 1: master */ ++}; ++ ++static struct spi_board_info omap3beagle_zippy2_spi_board_info[] __initdata = { ++ { ++ .modalias = "ks8851", ++ .bus_num = 4, ++ .chip_select = 0, ++ .max_speed_hz = 36000000, ++ .controller_data = &ks8851_spi_chip_info, ++ }, ++}; ++ ++static void __init omap3beagle_ks8851_init(void) ++{ ++ if ((gpio_request(OMAP3BEAGLE_GPIO_KS8851_IRQ, "KS8851_IRQ") == 0) && ++ (gpio_direction_input(OMAP3BEAGLE_GPIO_KS8851_IRQ) == 0)) { ++ gpio_export(OMAP3BEAGLE_GPIO_KS8851_IRQ, 0); ++ omap3beagle_zippy2_spi_board_info[0].irq = OMAP_GPIO_IRQ(OMAP3BEAGLE_GPIO_KS8851_IRQ); ++ set_irq_type(omap3beagle_zippy2_spi_board_info[0].irq, IRQ_TYPE_EDGE_FALLING); ++ } else { ++ printk(KERN_ERR "could not obtain gpio for KS8851_IRQ\n"); ++ return; ++ } ++ ++ spi_register_board_info(omap3beagle_zippy2_spi_board_info, ++ ARRAY_SIZE(omap3beagle_zippy2_spi_board_info)); ++} ++ ++#else ++static inline void __init omap3beagle_ks8851_init(void) { return; } ++#endif + + static struct mtd_partition omap3beagle_nand_partitions[] = { + /* All the partition sizes are listed in terms of NAND block size */ +@@ -281,8 +324,6 @@ static struct twl4030_hsmmc_info mmc[] = { + { + .mmc = 2, + .wires = 4, +- .gpio_wp = 141, +- .gpio_cd = 162, + .transceiver = true, + .ocr_mask = 0x00100000, /* 3.3V */ + }, +@@ -606,7 +647,7 @@ static void __init omap3beagle_flash_init(void) + } + } + +-static struct ehci_hcd_omap_platform_data ehci_pdata __initconst = { ++static struct ehci_hcd_omap_platform_data ehci_pdata __initdata = { + + .port_mode[0] = EHCI_HCD_OMAP_MODE_PHY, + .port_mode[1] = EHCI_HCD_OMAP_MODE_PHY, +@@ -626,6 +667,15 @@ static struct omap_board_mux board_mux[] __initdata = { + #define board_mux NULL + #endif + ++static int __init expansionboard_setup(char *str) ++{ ++ if (!str) ++ return -EINVAL; ++ strncpy(expansionboard_name, str, 16); ++ printk(KERN_INFO "Beagle expansionboard: %s\n", expansionboard_name); ++ return 0; ++} ++ + static void __init omap3_beagle_init(void) + { + omap3_mux_init(board_mux, OMAP_PACKAGE_CBB); +@@ -639,8 +689,24 @@ static void __init omap3_beagle_init(void) + /* REVISIT leave DVI powered down until it's needed ... */ + gpio_direction_output(170, true); + +- omap3beagle_enc28j60_init(); +- ++ if(!strcmp(expansionboard_name, "zippy")) ++ { ++ printk(KERN_INFO "Beagle expansionboard: initializing enc28j60\n"); ++ omap3beagle_enc28j60_init(); ++ printk(KERN_INFO "Beagle expansionboard: assigning GPIO 141 and 162 to MMC1\n"); ++ mmc[1].gpio_wp = 141; ++ mmc[1].gpio_cd = 162; ++ } ++ ++ if(!strcmp(expansionboard_name, "zippy2")) ++ { ++ printk(KERN_INFO "Beagle expansionboard: initializing ks_8851\n"); ++ omap3beagle_ks8851_init(); ++ printk(KERN_INFO "Beagle expansionboard: assigning GPIO 141 and 162 to MMC1\n"); ++ mmc[1].gpio_wp = 141; ++ mmc[1].gpio_cd = 162; ++ } ++ + usb_musb_init(); + usb_ehci_init(&ehci_pdata); + omap3beagle_flash_init(); +@@ -657,6 +723,8 @@ static void __init omap3_beagle_map_io(void) + omap2_map_common_io(); + } + ++early_param("buddy", expansionboard_setup); ++ + MACHINE_START(OMAP3_BEAGLE, "OMAP3 Beagle Board") + /* Maintainer: Syed Mohammed Khasim - http://beagleboard.org */ + .phys_io = 0x48000000, +-- +1.6.6.1 + diff --git a/recipes/linux/linux-omap-psp_2.6.32.bb b/recipes/linux/linux-omap-psp_2.6.32.bb index edfc19ad97..bce446dae6 100644 --- a/recipes/linux/linux-omap-psp_2.6.32.bb +++ b/recipes/linux/linux-omap-psp_2.6.32.bb @@ -54,6 +54,7 @@ SRC_URI = "git://arago-project.org/git/people/sriram/ti-psp-omap.git;protocol=gi file://0043-musb-allow-host-io-without-gadget-module.patch;patch=1 \ file://0044-MTD-silence-ecc-errors-on-mtdblock0.patch;patch=1 \ file://0045-ARM-OMAP-update-beagleboard-defconfig.patch;patch=1 \ + file://0043-ARM-OMAP-beagleboard-Add-infrastructure-to-do-fixups.patch;patch=1 \ file://defconfig" SRC_URI_append_beagleboard = " file://logo_linux_clut224.ppm \ |