From 369c3002ab5090b925f5b6132cae6f2f72e1593a Mon Sep 17 00:00:00 2001 From: Koen Kooi Date: Thu, 9 Dec 2010 10:25:33 +0100 Subject: linux-omap 2.6.37rc: bump to rc5 Signed-off-by: Koen Kooi --- ...wer-on-EHCI-serial-camera-and-DVI-on-beag.patch | 53 +++ ...agleboard-Add-infrastructure-to-do-fixups.patch | 219 --------- .../0002-modedb.c-add-proper-720p60-mode.patch | 28 -- ...0002-omap-Beagle-detect-new-xM-revision-B.patch | 43 ++ ...agleboard-Add-infrastructure-to-do-fixups.patch | 219 +++++++++ ...fix-USB-initialization-for-beagleboard-xM.patch | 37 -- ...wer-on-EHCI-serial-camera-and-DVI-on-beag.patch | 43 -- ...agleboard-pre-export-GPIOs-to-userspace-w.patch | 57 +++ ...isplay-single-block-read-console-messages.patch | 28 -- .../0005-modedb.c-add-proper-720p60-mode.patch | 28 ++ .../0006-MTD-silence-ecc-errors-on-mtdblock0.patch | 63 --- ...isplay-single-block-read-console-messages.patch | 28 ++ .../0007-MTD-silence-ecc-errors-on-mtdblock0.patch | 63 +++ .../linux-omap-2.6.37rc/0007-Miracle-patch.patch | 504 --------------------- .../0008-ARM-OMAP-add-omap_rev_-macros.patch | 81 ---- .../linux-omap-2.6.37rc/0008-Miracle-patch.patch | 504 +++++++++++++++++++++ .../0009-ARM-OMAP-add-omap_rev_-macros.patch | 81 ++++ ...0009-omap-Beagle-detect-new-xM-revision-B.patch | 43 -- ...enable-hsclk-in-dsi_pll_init-for-OMAP36XX.patch | 4 +- .../0011-AM37x-Switch-SGX-clocks-to-200MHz.patch | 29 ++ ...1-omap3-Increase-limit-on-bootarg-mpurate.patch | 33 -- .../0012-AM37x-Switch-SGX-clocks-to-200MHz.patch | 29 -- ...0013-ARM-OMAP-Beagle-clarify-CAM_EN-power.patch | 26 -- ...agleboard-pre-export-GPIOs-to-userspace-w.patch | 57 --- recipes/linux/linux-omap_2.6.37rc.bb | 29 +- 25 files changed, 1120 insertions(+), 1209 deletions(-) create mode 100644 recipes/linux/linux-omap-2.6.37rc/0001-ARM-OMAP-Power-on-EHCI-serial-camera-and-DVI-on-beag.patch delete mode 100644 recipes/linux/linux-omap-2.6.37rc/0001-ARM-OMAP-beagleboard-Add-infrastructure-to-do-fixups.patch delete mode 100644 recipes/linux/linux-omap-2.6.37rc/0002-modedb.c-add-proper-720p60-mode.patch create mode 100644 recipes/linux/linux-omap-2.6.37rc/0002-omap-Beagle-detect-new-xM-revision-B.patch create mode 100644 recipes/linux/linux-omap-2.6.37rc/0003-ARM-OMAP-beagleboard-Add-infrastructure-to-do-fixups.patch delete mode 100644 recipes/linux/linux-omap-2.6.37rc/0003-ARM-OMAP-fix-USB-initialization-for-beagleboard-xM.patch delete mode 100644 recipes/linux/linux-omap-2.6.37rc/0004-ARM-OMAP-Power-on-EHCI-serial-camera-and-DVI-on-beag.patch create mode 100644 recipes/linux/linux-omap-2.6.37rc/0004-ARM-OMAP-beagleboard-pre-export-GPIOs-to-userspace-w.patch delete mode 100644 recipes/linux/linux-omap-2.6.37rc/0005-mmc-don-t-display-single-block-read-console-messages.patch create mode 100644 recipes/linux/linux-omap-2.6.37rc/0005-modedb.c-add-proper-720p60-mode.patch delete mode 100644 recipes/linux/linux-omap-2.6.37rc/0006-MTD-silence-ecc-errors-on-mtdblock0.patch create mode 100644 recipes/linux/linux-omap-2.6.37rc/0006-mmc-don-t-display-single-block-read-console-messages.patch create mode 100644 recipes/linux/linux-omap-2.6.37rc/0007-MTD-silence-ecc-errors-on-mtdblock0.patch delete mode 100644 recipes/linux/linux-omap-2.6.37rc/0007-Miracle-patch.patch delete mode 100644 recipes/linux/linux-omap-2.6.37rc/0008-ARM-OMAP-add-omap_rev_-macros.patch create mode 100644 recipes/linux/linux-omap-2.6.37rc/0008-Miracle-patch.patch create mode 100644 recipes/linux/linux-omap-2.6.37rc/0009-ARM-OMAP-add-omap_rev_-macros.patch delete mode 100644 recipes/linux/linux-omap-2.6.37rc/0009-omap-Beagle-detect-new-xM-revision-B.patch create mode 100644 recipes/linux/linux-omap-2.6.37rc/0011-AM37x-Switch-SGX-clocks-to-200MHz.patch delete mode 100644 recipes/linux/linux-omap-2.6.37rc/0011-omap3-Increase-limit-on-bootarg-mpurate.patch delete mode 100644 recipes/linux/linux-omap-2.6.37rc/0012-AM37x-Switch-SGX-clocks-to-200MHz.patch delete mode 100644 recipes/linux/linux-omap-2.6.37rc/0013-ARM-OMAP-Beagle-clarify-CAM_EN-power.patch delete mode 100644 recipes/linux/linux-omap-2.6.37rc/0014-ARM-OMAP-beagleboard-pre-export-GPIOs-to-userspace-w.patch (limited to 'recipes/linux') diff --git a/recipes/linux/linux-omap-2.6.37rc/0001-ARM-OMAP-Power-on-EHCI-serial-camera-and-DVI-on-beag.patch b/recipes/linux/linux-omap-2.6.37rc/0001-ARM-OMAP-Power-on-EHCI-serial-camera-and-DVI-on-beag.patch new file mode 100644 index 0000000000..8518d79742 --- /dev/null +++ b/recipes/linux/linux-omap-2.6.37rc/0001-ARM-OMAP-Power-on-EHCI-serial-camera-and-DVI-on-beag.patch @@ -0,0 +1,53 @@ +From c403de48a5a02e58aabf82f14a068a056fa891f3 Mon Sep 17 00:00:00 2001 +From: Koen Kooi +Date: Thu, 7 Oct 2010 09:25:45 +0200 +Subject: [PATCH 01/11] ARM: OMAP: Power on EHCI, serial, camera and DVI on beagleboard-xM + +Signed-off-by: Koen Kooi +--- + arch/arm/mach-omap2/board-omap3beagle.c | 27 +++++++++++++++++++++++---- + 1 files changed, 23 insertions(+), 4 deletions(-) + +diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c +index f1a8ede..9c9bd96 100644 +--- a/arch/arm/mach-omap2/board-omap3beagle.c ++++ b/arch/arm/mach-omap2/board-omap3beagle.c +@@ -297,12 +297,31 @@ static int beagle_twl_gpio_setup(struct device *dev, + gpio_request(gpio + 1, "EHCI_nOC"); + gpio_direction_input(gpio + 1); + +- /* TWL4030_GPIO_MAX + 0 == ledA, EHCI nEN_USB_PWR (out, active low) */ ++ /* TWL4030_GPIO_MAX + 0 == ledA, EHCI nEN_USB_PWR (out, XM active ++ * high / others active low) */ + gpio_request(gpio + TWL4030_GPIO_MAX, "nEN_USB_PWR"); +- gpio_direction_output(gpio + TWL4030_GPIO_MAX, 0); ++ if (omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XM) ++ gpio_direction_output(gpio + TWL4030_GPIO_MAX, 1); ++ else ++ gpio_direction_output(gpio + TWL4030_GPIO_MAX, 0); ++ ++ /* DVI reset GPIO is different between revisions */ ++ if (omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XM) ++ beagle_dvi_device.reset_gpio = 129; ++ else ++ beagle_dvi_device.reset_gpio = 170; ++ ++ /* Power on DVI, Serial and PWR led */ ++ if (omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XM) { ++ gpio_request(gpio + 1, "nDVI_PWR_EN"); ++ gpio_direction_output(gpio + 1, 0); ++ } + +- /* TWL4030_GPIO_MAX + 1 == ledB, PMU_STAT (out, active low LED) */ +- gpio_leds[2].gpio = gpio + TWL4030_GPIO_MAX + 1; ++ /* Power on camera interface on P7/P8 or DVI on A2 and beyond */ ++ if (omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XM) { ++ gpio_request(gpio + 2, "CAM_EN"); ++ gpio_direction_output(gpio + 2, 1); ++ } + + return 0; + } +-- +1.6.6.1 + diff --git a/recipes/linux/linux-omap-2.6.37rc/0001-ARM-OMAP-beagleboard-Add-infrastructure-to-do-fixups.patch b/recipes/linux/linux-omap-2.6.37rc/0001-ARM-OMAP-beagleboard-Add-infrastructure-to-do-fixups.patch deleted file mode 100644 index 8b40d660cf..0000000000 --- a/recipes/linux/linux-omap-2.6.37rc/0001-ARM-OMAP-beagleboard-Add-infrastructure-to-do-fixups.patch +++ /dev/null @@ -1,219 +0,0 @@ -From 29fb3969c82a750b41746a299e484172dba443dc Mon Sep 17 00:00:00 2001 -From: Koen Kooi -Date: Wed, 6 Oct 2010 10:19:34 +0200 -Subject: [PATCH 01/14] ARM: OMAP: beagleboard: Add infrastructure to do fixups based on expansionboard name passed by u-boot - -Add support for Tincantools Zippy and Zippy2 expansionboards as well - -Signed-off-by: Koen Kooi ---- - arch/arm/mach-omap2/board-omap3beagle.c | 142 ++++++++++++++++++++++++++++++- - 1 files changed, 139 insertions(+), 3 deletions(-) - -diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c -index f1a8ede..2943e1f 100644 ---- a/arch/arm/mach-omap2/board-omap3beagle.c -+++ b/arch/arm/mach-omap2/board-omap3beagle.c -@@ -21,6 +21,7 @@ - #include - #include - #include -+#include - #include - #include - -@@ -138,6 +139,92 @@ fail0: - return; - } - -+char expansionboard_name[16]; -+ -+#if defined(CONFIG_ENC28J60) || defined(CONFIG_ENC28J60_MODULE) -+ -+#include -+#include -+ -+#define OMAP3BEAGLE_GPIO_ENC28J60_IRQ 157 -+ -+static struct omap2_mcspi_device_config enc28j60_spi_chip_info = { -+ .turbo_mode = 0, -+ .single_channel = 1, /* 0: slave, 1: master */ -+}; -+ -+static struct spi_board_info omap3beagle_zippy_spi_board_info[] __initdata = { -+ { -+ .modalias = "enc28j60", -+ .bus_num = 4, -+ .chip_select = 0, -+ .max_speed_hz = 20000000, -+ .controller_data = &enc28j60_spi_chip_info, -+ }, -+}; -+ -+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_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_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 -+#include -+ -+#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 */ - { -@@ -257,6 +344,12 @@ static struct omap2_hsmmc_info mmc[] = { - .caps = MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA, - .gpio_wp = 29, - }, -+ { -+ .mmc = 2, -+ .caps = MMC_CAP_4_BIT_DATA, -+ .transceiver = true, -+ .ocr_mask = 0x00100000, /* 3.3V */ -+ }, - {} /* Terminator */ - }; - -@@ -404,7 +497,7 @@ static struct twl4030_platform_data beagle_twldata = { - .vpll2 = &beagle_vpll2, - }; - --static struct i2c_board_info __initdata beagle_i2c_boardinfo[] = { -+static struct i2c_board_info __initdata beagle_i2c1_boardinfo[] = { - { - I2C_BOARD_INFO("twl4030", 0x48), - .flags = I2C_CLIENT_WAKE, -@@ -419,10 +512,24 @@ static struct i2c_board_info __initdata beagle_i2c_eeprom[] = { - }, - }; - -+#if defined(CONFIG_RTC_DRV_DS1307) || \ -+ defined(CONFIG_RTC_DRV_DS1307_MODULE) -+ -+static struct i2c_board_info __initdata beagle_i2c2_boardinfo[] = { -+ { -+ I2C_BOARD_INFO("ds1307", 0x68), -+ }, -+}; -+#else -+static struct i2c_board_info __initdata beagle_i2c2_boardinfo[] = {}; -+#endif -+ - static int __init omap3_beagle_i2c_init(void) - { -- omap_register_i2c_bus(1, 2600, beagle_i2c_boardinfo, -- ARRAY_SIZE(beagle_i2c_boardinfo)); -+ omap_register_i2c_bus(1, 2600, beagle_i2c1_boardinfo, -+ ARRAY_SIZE(beagle_i2c1_boardinfo)); -+ omap_register_i2c_bus(2, 400, beagle_i2c2_boardinfo, -+ ARRAY_SIZE(beagle_i2c2_boardinfo)); - /* Bus 3 is attached to the DVI port where devices like the pico DLP - * projector don't work reliably with 400kHz */ - omap_register_i2c_bus(3, 100, beagle_i2c_eeprom, ARRAY_SIZE(beagle_i2c_eeprom)); -@@ -555,6 +662,15 @@ static struct omap_musb_board_data musb_board_data = { - .power = 100, - }; - -+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); -@@ -569,6 +685,24 @@ static void __init omap3_beagle_init(void) - /* REVISIT leave DVI powered down until it's needed ... */ - gpio_direction_output(170, true); - -+ 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(&musb_board_data); - usb_ehci_init(&ehci_pdata); - omap3beagle_flash_init(); -@@ -580,6 +714,8 @@ static void __init omap3_beagle_init(void) - beagle_display_init(); - } - -+early_param("buddy", expansionboard_setup); -+ - MACHINE_START(OMAP3_BEAGLE, "OMAP3 Beagle Board") - /* Maintainer: Syed Mohammed Khasim - http://beagleboard.org */ - .boot_params = 0x80000100, --- -1.6.6.1 - diff --git a/recipes/linux/linux-omap-2.6.37rc/0002-modedb.c-add-proper-720p60-mode.patch b/recipes/linux/linux-omap-2.6.37rc/0002-modedb.c-add-proper-720p60-mode.patch deleted file mode 100644 index 1dbcaa803d..0000000000 --- a/recipes/linux/linux-omap-2.6.37rc/0002-modedb.c-add-proper-720p60-mode.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 415c97e9ba23bb7d0f24edde11236b0a149d134c Mon Sep 17 00:00:00 2001 -From: Koen Kooi -Date: Mon, 8 Mar 2010 14:38:31 +0100 -Subject: [PATCH 02/14] modedb.c: add proper 720p60 mode - -Signed-off-by: Koen Kooi ---- - drivers/video/modedb.c | 4 ++++ - 1 files changed, 4 insertions(+), 0 deletions(-) - -diff --git a/drivers/video/modedb.c b/drivers/video/modedb.c -index 0a4dbdc..53edf81 100644 ---- a/drivers/video/modedb.c -+++ b/drivers/video/modedb.c -@@ -46,6 +46,10 @@ static const struct fb_videomode modedb[] = { - NULL, 60, 640, 480, 39721, 40, 24, 32, 11, 96, 2, - 0, FB_VMODE_NONINTERLACED - }, { -+ /* 1280x720 @ 60 Hz, 45 kHz hsync, CEA 681-E Format 4 */ -+ "hd720", 60, 1280, 720, 13468, 220, 110, 20, 5, 40, 5, -+ 0, FB_VMODE_NONINTERLACED -+ }, { - /* 800x600 @ 56 Hz, 35.15 kHz hsync */ - NULL, 56, 800, 600, 27777, 128, 24, 22, 1, 72, 2, - 0, FB_VMODE_NONINTERLACED --- -1.6.6.1 - diff --git a/recipes/linux/linux-omap-2.6.37rc/0002-omap-Beagle-detect-new-xM-revision-B.patch b/recipes/linux/linux-omap-2.6.37rc/0002-omap-Beagle-detect-new-xM-revision-B.patch new file mode 100644 index 0000000000..89694c6d96 --- /dev/null +++ b/recipes/linux/linux-omap-2.6.37rc/0002-omap-Beagle-detect-new-xM-revision-B.patch @@ -0,0 +1,43 @@ +From c10787108ac19e36cf8d8f15c3c93edff94a9f10 Mon Sep 17 00:00:00 2001 +From: Robert Nelson +Date: Tue, 9 Nov 2010 08:34:55 -0600 +Subject: [PATCH 02/11] omap: Beagle: detect new xM revision B + +The xM B uses a DM3730 ES1.1 over the ES1.0 on xM A's, no other board changes. + +Signed-off-by: Robert Nelson +Signed-off-by: Koen Kooi +--- + arch/arm/mach-omap2/board-omap3beagle.c | 9 +++++++-- + 1 files changed, 7 insertions(+), 2 deletions(-) + +diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c +index 9c9bd96..159d81b 100644 +--- a/arch/arm/mach-omap2/board-omap3beagle.c ++++ b/arch/arm/mach-omap2/board-omap3beagle.c +@@ -58,7 +58,8 @@ + * AXBX = GPIO173, GPIO172, GPIO171: 1 1 1 + * C1_3 = GPIO173, GPIO172, GPIO171: 1 1 0 + * C4 = GPIO173, GPIO172, GPIO171: 1 0 1 +- * XM = GPIO173, GPIO172, GPIO171: 0 0 0 ++ * XMA = GPIO173, GPIO172, GPIO171: 0 0 0 ++ * XMB = GPIO173, GPIO172, GPIO171: 0 0 1 + */ + enum { + OMAP3BEAGLE_BOARD_UNKN = 0, +@@ -117,7 +118,11 @@ static void __init omap3_beagle_init_rev(void) + omap3_beagle_version = OMAP3BEAGLE_BOARD_C4; + break; + case 0: +- printk(KERN_INFO "OMAP3 Beagle Rev: xM\n"); ++ printk(KERN_INFO "OMAP3 Beagle Rev: xM A\n"); ++ omap3_beagle_version = OMAP3BEAGLE_BOARD_XM; ++ break; ++ case 1: ++ printk(KERN_INFO "OMAP3 Beagle Rev: xM B\n"); + omap3_beagle_version = OMAP3BEAGLE_BOARD_XM; + break; + default: +-- +1.6.6.1 + diff --git a/recipes/linux/linux-omap-2.6.37rc/0003-ARM-OMAP-beagleboard-Add-infrastructure-to-do-fixups.patch b/recipes/linux/linux-omap-2.6.37rc/0003-ARM-OMAP-beagleboard-Add-infrastructure-to-do-fixups.patch new file mode 100644 index 0000000000..b713d80098 --- /dev/null +++ b/recipes/linux/linux-omap-2.6.37rc/0003-ARM-OMAP-beagleboard-Add-infrastructure-to-do-fixups.patch @@ -0,0 +1,219 @@ +From ea4d9ef8f8550985ee062d5f186efa02bbdb53d1 Mon Sep 17 00:00:00 2001 +From: Koen Kooi +Date: Wed, 6 Oct 2010 10:19:34 +0200 +Subject: [PATCH 03/11] ARM: OMAP: beagleboard: Add infrastructure to do fixups based on expansionboard name passed by u-boot + +Add support for Tincantools Zippy and Zippy2 expansionboards as well + +Signed-off-by: Koen Kooi +--- + arch/arm/mach-omap2/board-omap3beagle.c | 142 ++++++++++++++++++++++++++++++- + 1 files changed, 139 insertions(+), 3 deletions(-) + +diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c +index 159d81b..030ab32 100644 +--- a/arch/arm/mach-omap2/board-omap3beagle.c ++++ b/arch/arm/mach-omap2/board-omap3beagle.c +@@ -21,6 +21,7 @@ + #include + #include + #include ++#include + #include + #include + +@@ -143,6 +144,92 @@ fail0: + return; + } + ++char expansionboard_name[16]; ++ ++#if defined(CONFIG_ENC28J60) || defined(CONFIG_ENC28J60_MODULE) ++ ++#include ++#include ++ ++#define OMAP3BEAGLE_GPIO_ENC28J60_IRQ 157 ++ ++static struct omap2_mcspi_device_config enc28j60_spi_chip_info = { ++ .turbo_mode = 0, ++ .single_channel = 1, /* 0: slave, 1: master */ ++}; ++ ++static struct spi_board_info omap3beagle_zippy_spi_board_info[] __initdata = { ++ { ++ .modalias = "enc28j60", ++ .bus_num = 4, ++ .chip_select = 0, ++ .max_speed_hz = 20000000, ++ .controller_data = &enc28j60_spi_chip_info, ++ }, ++}; ++ ++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_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_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 ++#include ++ ++#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 */ + { +@@ -262,6 +349,12 @@ static struct omap2_hsmmc_info mmc[] = { + .caps = MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA, + .gpio_wp = 29, + }, ++ { ++ .mmc = 2, ++ .caps = MMC_CAP_4_BIT_DATA, ++ .transceiver = true, ++ .ocr_mask = 0x00100000, /* 3.3V */ ++ }, + {} /* Terminator */ + }; + +@@ -428,7 +521,7 @@ static struct twl4030_platform_data beagle_twldata = { + .vpll2 = &beagle_vpll2, + }; + +-static struct i2c_board_info __initdata beagle_i2c_boardinfo[] = { ++static struct i2c_board_info __initdata beagle_i2c1_boardinfo[] = { + { + I2C_BOARD_INFO("twl4030", 0x48), + .flags = I2C_CLIENT_WAKE, +@@ -443,10 +536,24 @@ static struct i2c_board_info __initdata beagle_i2c_eeprom[] = { + }, + }; + ++#if defined(CONFIG_RTC_DRV_DS1307) || \ ++ defined(CONFIG_RTC_DRV_DS1307_MODULE) ++ ++static struct i2c_board_info __initdata beagle_i2c2_boardinfo[] = { ++ { ++ I2C_BOARD_INFO("ds1307", 0x68), ++ }, ++}; ++#else ++static struct i2c_board_info __initdata beagle_i2c2_boardinfo[] = {}; ++#endif ++ + static int __init omap3_beagle_i2c_init(void) + { +- omap_register_i2c_bus(1, 2600, beagle_i2c_boardinfo, +- ARRAY_SIZE(beagle_i2c_boardinfo)); ++ omap_register_i2c_bus(1, 2600, beagle_i2c1_boardinfo, ++ ARRAY_SIZE(beagle_i2c1_boardinfo)); ++ omap_register_i2c_bus(2, 400, beagle_i2c2_boardinfo, ++ ARRAY_SIZE(beagle_i2c2_boardinfo)); + /* Bus 3 is attached to the DVI port where devices like the pico DLP + * projector don't work reliably with 400kHz */ + omap_register_i2c_bus(3, 100, beagle_i2c_eeprom, ARRAY_SIZE(beagle_i2c_eeprom)); +@@ -579,6 +686,15 @@ static struct omap_musb_board_data musb_board_data = { + .power = 100, + }; + ++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); +@@ -593,6 +709,24 @@ static void __init omap3_beagle_init(void) + /* REVISIT leave DVI powered down until it's needed ... */ + gpio_direction_output(170, true); + ++ 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(&musb_board_data); + usb_ehci_init(&ehci_pdata); + omap3beagle_flash_init(); +@@ -604,6 +738,8 @@ static void __init omap3_beagle_init(void) + beagle_display_init(); + } + ++early_param("buddy", expansionboard_setup); ++ + MACHINE_START(OMAP3_BEAGLE, "OMAP3 Beagle Board") + /* Maintainer: Syed Mohammed Khasim - http://beagleboard.org */ + .boot_params = 0x80000100, +-- +1.6.6.1 + diff --git a/recipes/linux/linux-omap-2.6.37rc/0003-ARM-OMAP-fix-USB-initialization-for-beagleboard-xM.patch b/recipes/linux/linux-omap-2.6.37rc/0003-ARM-OMAP-fix-USB-initialization-for-beagleboard-xM.patch deleted file mode 100644 index b20c8c6ce4..0000000000 --- a/recipes/linux/linux-omap-2.6.37rc/0003-ARM-OMAP-fix-USB-initialization-for-beagleboard-xM.patch +++ /dev/null @@ -1,37 +0,0 @@ -From c908140c053071789dfa72f34bee76223ba9bdb7 Mon Sep 17 00:00:00 2001 -From: Koen Kooi -Date: Thu, 7 Oct 2010 09:25:45 +0200 -Subject: [PATCH 03/14] ARM: OMAP: fix USB initialization for beagleboard-xM - -Signed-off-by: Koen Kooi ---- - arch/arm/mach-omap2/board-omap3beagle.c | 12 +++++++----- - 1 files changed, 7 insertions(+), 5 deletions(-) - -diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c -index 2943e1f..92335a9 100644 ---- a/arch/arm/mach-omap2/board-omap3beagle.c -+++ b/arch/arm/mach-omap2/board-omap3beagle.c -@@ -390,12 +390,14 @@ static int beagle_twl_gpio_setup(struct device *dev, - gpio_request(gpio + 1, "EHCI_nOC"); - gpio_direction_input(gpio + 1); - -- /* TWL4030_GPIO_MAX + 0 == ledA, EHCI nEN_USB_PWR (out, active low) */ -+ /* TWL4030_GPIO_MAX + 0 == ledA, EHCI nEN_USB_PWR (out, XM active -+ * high / others active low) */ - gpio_request(gpio + TWL4030_GPIO_MAX, "nEN_USB_PWR"); -- gpio_direction_output(gpio + TWL4030_GPIO_MAX, 0); -- -- /* TWL4030_GPIO_MAX + 1 == ledB, PMU_STAT (out, active low LED) */ -- gpio_leds[2].gpio = gpio + TWL4030_GPIO_MAX + 1; -+ if (omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XM) { -+ gpio_direction_output(gpio + TWL4030_GPIO_MAX, 1); -+ } else { -+ gpio_direction_output(gpio + TWL4030_GPIO_MAX, 0); -+ } - - return 0; - } --- -1.6.6.1 - diff --git a/recipes/linux/linux-omap-2.6.37rc/0004-ARM-OMAP-Power-on-EHCI-serial-camera-and-DVI-on-beag.patch b/recipes/linux/linux-omap-2.6.37rc/0004-ARM-OMAP-Power-on-EHCI-serial-camera-and-DVI-on-beag.patch deleted file mode 100644 index 0dd728792c..0000000000 --- a/recipes/linux/linux-omap-2.6.37rc/0004-ARM-OMAP-Power-on-EHCI-serial-camera-and-DVI-on-beag.patch +++ /dev/null @@ -1,43 +0,0 @@ -From 28d1c68dd4fd99b61375217efbe7b59f42f5c886 Mon Sep 17 00:00:00 2001 -From: Koen Kooi -Date: Thu, 7 Oct 2010 11:46:01 +0200 -Subject: [PATCH 04/14] ARM: OMAP: Power on EHCI, serial, camera and DVI on beagleboard-x< - -Signed-off-by: Koen Kooi ---- - arch/arm/mach-omap2/board-omap3beagle.c | 19 +++++++++++++++++++ - 1 files changed, 19 insertions(+), 0 deletions(-) - -diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c -index 92335a9..6d7f008 100644 ---- a/arch/arm/mach-omap2/board-omap3beagle.c -+++ b/arch/arm/mach-omap2/board-omap3beagle.c -@@ -399,6 +399,25 @@ static int beagle_twl_gpio_setup(struct device *dev, - gpio_direction_output(gpio + TWL4030_GPIO_MAX, 0); - } - -+ /* DVI reset GPIO is different between revisions */ -+ if (omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XM) { -+ beagle_dvi_device.reset_gpio = 129; -+ } else { -+ beagle_dvi_device.reset_gpio = 170; -+ } -+ -+ /* Power on DVI, Serial and PWR led */ -+ if (omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XM) { -+ gpio_request(gpio + 1, "nDVI_PWR_EN"); -+ gpio_direction_output(gpio + 1, 0); -+ } -+ -+ /* Power on camera interface */ -+ if (omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XM) { -+ gpio_request(gpio + 2, "CAM_EN"); -+ gpio_direction_output(gpio + 2, 1); -+ } -+ - return 0; - } - --- -1.6.6.1 - diff --git a/recipes/linux/linux-omap-2.6.37rc/0004-ARM-OMAP-beagleboard-pre-export-GPIOs-to-userspace-w.patch b/recipes/linux/linux-omap-2.6.37rc/0004-ARM-OMAP-beagleboard-pre-export-GPIOs-to-userspace-w.patch new file mode 100644 index 0000000000..3d1f6eecdc --- /dev/null +++ b/recipes/linux/linux-omap-2.6.37rc/0004-ARM-OMAP-beagleboard-pre-export-GPIOs-to-userspace-w.patch @@ -0,0 +1,57 @@ +From 9d5908876b85482b55ec36d3dc9970bc43a9b331 Mon Sep 17 00:00:00 2001 +From: Koen Kooi +Date: Sun, 5 Dec 2010 13:25:00 +0100 +Subject: [PATCH 04/11] ARM: OMAP: beagleboard: pre-export GPIOs to userspace when using a Tincantools trainerboard + +This really needs a for loop, patches welcome + +Signed-off-by: Koen Kooi +--- + arch/arm/mach-omap2/board-omap3beagle.c | 31 +++++++++++++++++++++++++++++++ + 1 files changed, 31 insertions(+), 0 deletions(-) + +diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c +index 030ab32..c78cdc1 100644 +--- a/arch/arm/mach-omap2/board-omap3beagle.c ++++ b/arch/arm/mach-omap2/board-omap3beagle.c +@@ -727,6 +727,37 @@ static void __init omap3_beagle_init(void) + mmc[1].gpio_cd = 162; + } + ++ if(!strcmp(expansionboard_name, "trainer")) ++ { ++ printk(KERN_INFO "Beagle expansionboard: exporting GPIOs 130-141,162 to userspace\n"); ++ gpio_request(130, "sysfs"); ++ gpio_export(130, 1); ++ gpio_request(131, "sysfs"); ++ gpio_export(131, 1); ++ gpio_request(132, "sysfs"); ++ gpio_export(132, 1); ++ gpio_request(133, "sysfs"); ++ gpio_export(133, 1); ++ gpio_request(134, "sysfs"); ++ gpio_export(134, 1); ++ gpio_request(135, "sysfs"); ++ gpio_export(135, 1); ++ gpio_request(136, "sysfs"); ++ gpio_export(136, 1); ++ gpio_request(137, "sysfs"); ++ gpio_export(137, 1); ++ gpio_request(138, "sysfs"); ++ gpio_export(138, 1); ++ gpio_request(139, "sysfs"); ++ gpio_export(139, 1); ++ gpio_request(140, "sysfs"); ++ gpio_export(140, 1); ++ gpio_request(141, "sysfs"); ++ gpio_export(141, 1); ++ gpio_request(162, "sysfs"); ++ gpio_export(162, 1); ++ } ++ + usb_musb_init(&musb_board_data); + usb_ehci_init(&ehci_pdata); + omap3beagle_flash_init(); +-- +1.6.6.1 + diff --git a/recipes/linux/linux-omap-2.6.37rc/0005-mmc-don-t-display-single-block-read-console-messages.patch b/recipes/linux/linux-omap-2.6.37rc/0005-mmc-don-t-display-single-block-read-console-messages.patch deleted file mode 100644 index 169bd0187c..0000000000 --- a/recipes/linux/linux-omap-2.6.37rc/0005-mmc-don-t-display-single-block-read-console-messages.patch +++ /dev/null @@ -1,28 +0,0 @@ -From d7fd875f1885b184c8c9f9145a9a00cc40af1c1b Mon Sep 17 00:00:00 2001 -From: Steve Sakoman -Date: Mon, 4 Jan 2010 19:20:25 -0800 -Subject: [PATCH 05/14] mmc: don't display single block read console messages - -mmc: don't display single block read console messages ---- - drivers/mmc/card/block.c | 4 ++-- - 1 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c -index 217f820..b0b68cc 100644 ---- a/drivers/mmc/card/block.c -+++ b/drivers/mmc/card/block.c -@@ -434,8 +434,8 @@ static int mmc_blk_issue_rw_rq(struct mmc_queue *mq, struct request *req) - if (brq.cmd.error || brq.data.error || brq.stop.error) { - if (brq.data.blocks > 1 && rq_data_dir(req) == READ) { - /* Redo read one sector at a time */ -- printk(KERN_WARNING "%s: retrying using single " -- "block read\n", req->rq_disk->disk_name); -+ /* printk(KERN_WARNING "%s: retrying using single " -+ "block read\n", req->rq_disk->disk_name); */ - disable_multi = 1; - continue; - } --- -1.6.6.1 - diff --git a/recipes/linux/linux-omap-2.6.37rc/0005-modedb.c-add-proper-720p60-mode.patch b/recipes/linux/linux-omap-2.6.37rc/0005-modedb.c-add-proper-720p60-mode.patch new file mode 100644 index 0000000000..edbfaa9de1 --- /dev/null +++ b/recipes/linux/linux-omap-2.6.37rc/0005-modedb.c-add-proper-720p60-mode.patch @@ -0,0 +1,28 @@ +From 2963f2663b0b2457bd0a02eaa2d72d20390af4aa Mon Sep 17 00:00:00 2001 +From: Koen Kooi +Date: Mon, 8 Mar 2010 14:38:31 +0100 +Subject: [PATCH 05/11] modedb.c: add proper 720p60 mode + +Signed-off-by: Koen Kooi +--- + drivers/video/modedb.c | 4 ++++ + 1 files changed, 4 insertions(+), 0 deletions(-) + +diff --git a/drivers/video/modedb.c b/drivers/video/modedb.c +index 0a4dbdc..53edf81 100644 +--- a/drivers/video/modedb.c ++++ b/drivers/video/modedb.c +@@ -46,6 +46,10 @@ static const struct fb_videomode modedb[] = { + NULL, 60, 640, 480, 39721, 40, 24, 32, 11, 96, 2, + 0, FB_VMODE_NONINTERLACED + }, { ++ /* 1280x720 @ 60 Hz, 45 kHz hsync, CEA 681-E Format 4 */ ++ "hd720", 60, 1280, 720, 13468, 220, 110, 20, 5, 40, 5, ++ 0, FB_VMODE_NONINTERLACED ++ }, { + /* 800x600 @ 56 Hz, 35.15 kHz hsync */ + NULL, 56, 800, 600, 27777, 128, 24, 22, 1, 72, 2, + 0, FB_VMODE_NONINTERLACED +-- +1.6.6.1 + diff --git a/recipes/linux/linux-omap-2.6.37rc/0006-MTD-silence-ecc-errors-on-mtdblock0.patch b/recipes/linux/linux-omap-2.6.37rc/0006-MTD-silence-ecc-errors-on-mtdblock0.patch deleted file mode 100644 index d909fff925..0000000000 --- a/recipes/linux/linux-omap-2.6.37rc/0006-MTD-silence-ecc-errors-on-mtdblock0.patch +++ /dev/null @@ -1,63 +0,0 @@ -From d7a2fe3f2304b3ad49e1f406565038fc3d8834e6 Mon Sep 17 00:00:00 2001 -From: Steve Sakoman -Date: Mon, 26 Apr 2010 11:17:26 -0700 -Subject: [PATCH 06/14] MTD: silence ecc errors on mtdblock0 - -mtdblock0 is the x-load partition, which uses hw ecc -this confuses linux, which uses sw ecc -this patch silences ecc error messages when linux peeks into mtdblock0 -* not for upstream submission * ---- - block/blk-core.c | 7 ++++--- - drivers/mtd/nand/nand_ecc.c | 2 +- - fs/buffer.c | 3 ++- - 3 files changed, 7 insertions(+), 5 deletions(-) - -diff --git a/block/blk-core.c b/block/blk-core.c -index 4ce953f..1ef9a01 100644 ---- a/block/blk-core.c -+++ b/block/blk-core.c -@@ -2028,9 +2028,10 @@ bool blk_update_request(struct request *req, int error, unsigned int nr_bytes) - - if (error && req->cmd_type == REQ_TYPE_FS && - !(req->cmd_flags & REQ_QUIET)) { -- printk(KERN_ERR "end_request: I/O error, dev %s, sector %llu\n", -- req->rq_disk ? req->rq_disk->disk_name : "?", -- (unsigned long long)blk_rq_pos(req)); -+ if (req->rq_disk && (strcmp(req->rq_disk->disk_name, "mtdblock0") != 0)) -+ printk(KERN_ERR "end_request: I/O error, dev %s, sector %llu\n", -+ req->rq_disk ? req->rq_disk->disk_name : "?", -+ (unsigned long long)blk_rq_pos(req)); - } - - blk_account_io_completion(req, nr_bytes); -diff --git a/drivers/mtd/nand/nand_ecc.c b/drivers/mtd/nand/nand_ecc.c -index 271b8e7..5924ba7 100644 ---- a/drivers/mtd/nand/nand_ecc.c -+++ b/drivers/mtd/nand/nand_ecc.c -@@ -507,7 +507,7 @@ int __nand_correct_data(unsigned char *buf, - if ((bitsperbyte[b0] + bitsperbyte[b1] + bitsperbyte[b2]) == 1) - return 1; /* error in ecc data; no action needed */ - -- printk(KERN_ERR "uncorrectable error : "); -+// printk(KERN_ERR "uncorrectable error : "); - return -1; - } - EXPORT_SYMBOL(__nand_correct_data); -diff --git a/fs/buffer.c b/fs/buffer.c -index 5930e38..06a00d5 100644 ---- a/fs/buffer.c -+++ b/fs/buffer.c -@@ -114,7 +114,8 @@ static int quiet_error(struct buffer_head *bh) - static void buffer_io_error(struct buffer_head *bh) - { - char b[BDEVNAME_SIZE]; -- printk(KERN_ERR "Buffer I/O error on device %s, logical block %Lu\n", -+ if (strcmp(bdevname(bh->b_bdev, b), "mtdblock0") != 0) -+ printk(KERN_ERR "Buffer I/O error on device %s, logical block %Lu\n", - bdevname(bh->b_bdev, b), - (unsigned long long)bh->b_blocknr); - } --- -1.6.6.1 - diff --git a/recipes/linux/linux-omap-2.6.37rc/0006-mmc-don-t-display-single-block-read-console-messages.patch b/recipes/linux/linux-omap-2.6.37rc/0006-mmc-don-t-display-single-block-read-console-messages.patch new file mode 100644 index 0000000000..643ea40539 --- /dev/null +++ b/recipes/linux/linux-omap-2.6.37rc/0006-mmc-don-t-display-single-block-read-console-messages.patch @@ -0,0 +1,28 @@ +From c0f7625ced4a0aa2cc0f0317ec2f1ef5a63b79e1 Mon Sep 17 00:00:00 2001 +From: Steve Sakoman +Date: Mon, 4 Jan 2010 19:20:25 -0800 +Subject: [PATCH 06/11] mmc: don't display single block read console messages + +mmc: don't display single block read console messages +--- + drivers/mmc/card/block.c | 4 ++-- + 1 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c +index 217f820..b0b68cc 100644 +--- a/drivers/mmc/card/block.c ++++ b/drivers/mmc/card/block.c +@@ -434,8 +434,8 @@ static int mmc_blk_issue_rw_rq(struct mmc_queue *mq, struct request *req) + if (brq.cmd.error || brq.data.error || brq.stop.error) { + if (brq.data.blocks > 1 && rq_data_dir(req) == READ) { + /* Redo read one sector at a time */ +- printk(KERN_WARNING "%s: retrying using single " +- "block read\n", req->rq_disk->disk_name); ++ /* printk(KERN_WARNING "%s: retrying using single " ++ "block read\n", req->rq_disk->disk_name); */ + disable_multi = 1; + continue; + } +-- +1.6.6.1 + diff --git a/recipes/linux/linux-omap-2.6.37rc/0007-MTD-silence-ecc-errors-on-mtdblock0.patch b/recipes/linux/linux-omap-2.6.37rc/0007-MTD-silence-ecc-errors-on-mtdblock0.patch new file mode 100644 index 0000000000..7327a41efe --- /dev/null +++ b/recipes/linux/linux-omap-2.6.37rc/0007-MTD-silence-ecc-errors-on-mtdblock0.patch @@ -0,0 +1,63 @@ +From 82fc365dde8758566ac3817c8a037711724b56b1 Mon Sep 17 00:00:00 2001 +From: Steve Sakoman +Date: Mon, 26 Apr 2010 11:17:26 -0700 +Subject: [PATCH 07/11] MTD: silence ecc errors on mtdblock0 + +mtdblock0 is the x-load partition, which uses hw ecc +this confuses linux, which uses sw ecc +this patch silences ecc error messages when linux peeks into mtdblock0 +* not for upstream submission * +--- + block/blk-core.c | 7 ++++--- + drivers/mtd/nand/nand_ecc.c | 2 +- + fs/buffer.c | 3 ++- + 3 files changed, 7 insertions(+), 5 deletions(-) + +diff --git a/block/blk-core.c b/block/blk-core.c +index 4ce953f..1ef9a01 100644 +--- a/block/blk-core.c ++++ b/block/blk-core.c +@@ -2028,9 +2028,10 @@ bool blk_update_request(struct request *req, int error, unsigned int nr_bytes) + + if (error && req->cmd_type == REQ_TYPE_FS && + !(req->cmd_flags & REQ_QUIET)) { +- printk(KERN_ERR "end_request: I/O error, dev %s, sector %llu\n", +- req->rq_disk ? req->rq_disk->disk_name : "?", +- (unsigned long long)blk_rq_pos(req)); ++ if (req->rq_disk && (strcmp(req->rq_disk->disk_name, "mtdblock0") != 0)) ++ printk(KERN_ERR "end_request: I/O error, dev %s, sector %llu\n", ++ req->rq_disk ? req->rq_disk->disk_name : "?", ++ (unsigned long long)blk_rq_pos(req)); + } + + blk_account_io_completion(req, nr_bytes); +diff --git a/drivers/mtd/nand/nand_ecc.c b/drivers/mtd/nand/nand_ecc.c +index 271b8e7..5924ba7 100644 +--- a/drivers/mtd/nand/nand_ecc.c ++++ b/drivers/mtd/nand/nand_ecc.c +@@ -507,7 +507,7 @@ int __nand_correct_data(unsigned char *buf, + if ((bitsperbyte[b0] + bitsperbyte[b1] + bitsperbyte[b2]) == 1) + return 1; /* error in ecc data; no action needed */ + +- printk(KERN_ERR "uncorrectable error : "); ++// printk(KERN_ERR "uncorrectable error : "); + return -1; + } + EXPORT_SYMBOL(__nand_correct_data); +diff --git a/fs/buffer.c b/fs/buffer.c +index 5930e38..06a00d5 100644 +--- a/fs/buffer.c ++++ b/fs/buffer.c +@@ -114,7 +114,8 @@ static int quiet_error(struct buffer_head *bh) + static void buffer_io_error(struct buffer_head *bh) + { + char b[BDEVNAME_SIZE]; +- printk(KERN_ERR "Buffer I/O error on device %s, logical block %Lu\n", ++ if (strcmp(bdevname(bh->b_bdev, b), "mtdblock0") != 0) ++ printk(KERN_ERR "Buffer I/O error on device %s, logical block %Lu\n", + bdevname(bh->b_bdev, b), + (unsigned long long)bh->b_blocknr); + } +-- +1.6.6.1 + diff --git a/recipes/linux/linux-omap-2.6.37rc/0007-Miracle-patch.patch b/recipes/linux/linux-omap-2.6.37rc/0007-Miracle-patch.patch deleted file mode 100644 index 2d1cb0e617..0000000000 --- a/recipes/linux/linux-omap-2.6.37rc/0007-Miracle-patch.patch +++ /dev/null @@ -1,504 +0,0 @@ -From 27f26e95a6cb18d2afc103c6b17bde7d79a95c01 Mon Sep 17 00:00:00 2001 -From: Mike Galbraith -Date: Fri, 19 Nov 2010 12:52:42 +0100 -Subject: [PATCH 07/14] Miracle patch -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -On Sun, 2010-11-14 at 16:26 -0800, Linus Torvalds wrote: -> On Sun, Nov 14, 2010 at 4:15 PM, Linus Torvalds -> wrote: -> > -> > THAT is why I think it's so silly to try to be so strict and walk over -> > all processes while holding a couple of spinlocks. -> -> Btw, let me say that I think the patch is great even with that thing -> in. It looks clean, the thing I'm complaining about is not a big deal, -> and it seems to perform very much as advertized. The difference with -> autogroup scheduling is very noticeable with a simple "make -j64" -> kernel compile. -> -> So I really don't think it's a big deal. The sysctl handler isn't even -> complicated. But boy does it hurt my eyes to see a spinlock held -> around a "do_each_thread()". And I do get the feeling that the -> simplest way to fix it would be to just remove the code entirely, and -> just say that "enabling/disabling may be delayed for old processes -> with existing autogroups". - -Which is what I just did. If the oddball case isn't a big deal, the -patch shrinks, which is a good thing. I just wanted to cover all bases. - -Patchlet with handler whacked: - -A recurring complaint from CFS users is that parallel kbuild has a negative -impact on desktop interactivity. This patch implements an idea from Linus, -to automatically create task groups. This patch only implements Linus' per -tty task group suggestion, and only for fair class tasks, but leaves the way -open for enhancement. - -Implementation: each task's signal struct contains an inherited pointer to a -refcounted autogroup struct containing a task group pointer, the default for -all tasks pointing to the init_task_group. When a task calls __proc_set_tty(), -the process wide reference to the default group is dropped, a new task group is -created, and the process is moved into the new task group. Children thereafter -inherit this task group, and increase it's refcount. On exit, a reference to the -current task group is dropped when the last reference to each signal struct is -dropped. The task group is destroyed when the last signal struct referencing -it is freed. At runqueue selection time, IFF a task has no cgroup assignment, -it's current autogroup is used. - -The feature is enabled from boot by default if CONFIG_SCHED_AUTOGROUP is -selected, but can be disabled via the boot option noautogroup, and can be -also be turned on/off on the fly via.. - echo [01] > /proc/sys/kernel/sched_autogroup_enabled. -..which will automatically move tasks to/from the root task group. - -Some numbers. - -A 100% hog overhead measurement proggy pinned to the same CPU as a make -j10 - -About measurement proggy: - pert/sec = perturbations/sec - min/max/avg = scheduler service latencies in usecs - sum/s = time accrued by the competition per sample period (1 sec here) - overhead = %CPU received by the competition per sample period - -pert/s: 31 >40475.37us: 3 min: 0.37 max:48103.60 avg:29573.74 sum/s:916786us overhead:90.24% -pert/s: 23 >41237.70us: 12 min: 0.36 max:56010.39 avg:40187.01 sum/s:924301us overhead:91.99% -pert/s: 24 >42150.22us: 12 min: 8.86 max:61265.91 avg:39459.91 sum/s:947038us overhead:92.20% -pert/s: 26 >42344.91us: 11 min: 3.83 max:52029.60 avg:36164.70 sum/s:940282us overhead:91.12% -pert/s: 24 >44262.90us: 14 min: 5.05 max:82735.15 avg:40314.33 sum/s:967544us overhead:92.22% - -Same load with this patch applied. - -pert/s: 229 >5484.43us: 41 min: 0.15 max:12069.42 avg:2193.81 sum/s:502382us overhead:50.24% -pert/s: 222 >5652.28us: 43 min: 0.46 max:12077.31 avg:2248.56 sum/s:499181us overhead:49.92% -pert/s: 211 >5809.38us: 43 min: 0.16 max:12064.78 avg:2381.70 sum/s:502538us overhead:50.25% -pert/s: 223 >6147.92us: 43 min: 0.15 max:16107.46 avg:2282.17 sum/s:508925us overhead:50.49% -pert/s: 218 >6252.64us: 43 min: 0.16 max:12066.13 avg:2324.11 sum/s:506656us overhead:50.27% - -Average service latency is an order of magnitude better with autogroup. -(Imagine that pert were Xorg or whatnot instead) - -Using Mathieu Desnoyers' wakeup-latency testcase: - -With taskset -c 3 make -j 10 running.. - -taskset -c 3 ./wakeup-latency& sleep 30;killall wakeup-latency - -without: -maximum latency: 42963.2 µs -average latency: 9077.0 µs -missed timer events: 0 - -with: -maximum latency: 4160.7 µs -average latency: 149.4 µs -missed timer events: 0 - -Signed-off-by: Mike Galbraith ---- - Documentation/kernel-parameters.txt | 2 + - drivers/tty/tty_io.c | 1 + - include/linux/sched.h | 19 +++++ - init/Kconfig | 12 +++ - kernel/fork.c | 5 +- - kernel/sched.c | 25 ++++-- - kernel/sched_autogroup.c | 140 +++++++++++++++++++++++++++++++++++ - kernel/sched_autogroup.h | 18 +++++ - kernel/sysctl.c | 11 +++ - 9 files changed, 224 insertions(+), 9 deletions(-) - create mode 100644 kernel/sched_autogroup.c - create mode 100644 kernel/sched_autogroup.h - -diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt -index cdd2a6e..b79a8fb 100644 ---- a/Documentation/kernel-parameters.txt -+++ b/Documentation/kernel-parameters.txt -@@ -1622,6 +1622,8 @@ and is between 256 and 4096 characters. It is defined in the file - noapic [SMP,APIC] Tells the kernel to not make use of any - IOAPICs that may be present in the system. - -+ noautogroup Disable scheduler automatic task group creation. -+ - nobats [PPC] Do not use BATs for mapping kernel lowmem - on "Classic" PPC cores. - -diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c -index c05c5af..5698038 100644 ---- a/drivers/tty/tty_io.c -+++ b/drivers/tty/tty_io.c -@@ -3160,6 +3160,7 @@ static void __proc_set_tty(struct task_struct *tsk, struct tty_struct *tty) - put_pid(tsk->signal->tty_old_pgrp); - tsk->signal->tty = tty_kref_get(tty); - tsk->signal->tty_old_pgrp = NULL; -+ sched_autogroup_create_attach(tsk); - } - - static void proc_set_tty(struct task_struct *tsk, struct tty_struct *tty) -diff --git a/include/linux/sched.h b/include/linux/sched.h -index 2c79e92..1e677c2 100644 ---- a/include/linux/sched.h -+++ b/include/linux/sched.h -@@ -509,6 +509,8 @@ struct thread_group_cputimer { - spinlock_t lock; - }; - -+struct autogroup; -+ - /* - * NOTE! "signal_struct" does not have it's own - * locking, because a shared signal_struct always -@@ -576,6 +578,9 @@ struct signal_struct { - - struct tty_struct *tty; /* NULL if no tty */ - -+#ifdef CONFIG_SCHED_AUTOGROUP -+ struct autogroup *autogroup; -+#endif - /* - * Cumulative resource counters for dead threads in the group, - * and for reaped dead child processes forked by this group. -@@ -1931,6 +1936,20 @@ int sched_rt_handler(struct ctl_table *table, int write, - - extern unsigned int sysctl_sched_compat_yield; - -+#ifdef CONFIG_SCHED_AUTOGROUP -+extern unsigned int sysctl_sched_autogroup_enabled; -+ -+extern void sched_autogroup_create_attach(struct task_struct *p); -+extern void sched_autogroup_detach(struct task_struct *p); -+extern void sched_autogroup_fork(struct signal_struct *sig); -+extern void sched_autogroup_exit(struct signal_struct *sig); -+#else -+static inline void sched_autogroup_create_attach(struct task_struct *p) { } -+static inline void sched_autogroup_detach(struct task_struct *p) { } -+static inline void sched_autogroup_fork(struct signal_struct *sig) { } -+static inline void sched_autogroup_exit(struct signal_struct *sig) { } -+#endif -+ - #ifdef CONFIG_RT_MUTEXES - extern int rt_mutex_getprio(struct task_struct *p); - extern void rt_mutex_setprio(struct task_struct *p, int prio); -diff --git a/init/Kconfig b/init/Kconfig -index c972899..a4985d9 100644 ---- a/init/Kconfig -+++ b/init/Kconfig -@@ -741,6 +741,18 @@ config NET_NS - - endif # NAMESPACES - -+config SCHED_AUTOGROUP -+ bool "Automatic process group scheduling" -+ select CGROUPS -+ select CGROUP_SCHED -+ select FAIR_GROUP_SCHED -+ help -+ This option optimizes the scheduler for common desktop workloads by -+ automatically creating and populating task groups. This separation -+ of workloads isolates aggressive CPU burners (like build jobs) from -+ desktop applications. Task group autogeneration is currently based -+ upon task tty association. -+ - config MM_OWNER - bool - -diff --git a/kernel/fork.c b/kernel/fork.c -index 3b159c5..b6f2475 100644 ---- a/kernel/fork.c -+++ b/kernel/fork.c -@@ -174,8 +174,10 @@ static inline void free_signal_struct(struct signal_struct *sig) - - static inline void put_signal_struct(struct signal_struct *sig) - { -- if (atomic_dec_and_test(&sig->sigcnt)) -+ if (atomic_dec_and_test(&sig->sigcnt)) { -+ sched_autogroup_exit(sig); - free_signal_struct(sig); -+ } - } - - void __put_task_struct(struct task_struct *tsk) -@@ -904,6 +906,7 @@ static int copy_signal(unsigned long clone_flags, struct task_struct *tsk) - posix_cpu_timers_init_group(sig); - - tty_audit_fork(sig); -+ sched_autogroup_fork(sig); - - sig->oom_adj = current->signal->oom_adj; - sig->oom_score_adj = current->signal->oom_score_adj; -diff --git a/kernel/sched.c b/kernel/sched.c -index dc91a4d..b4ed496 100644 ---- a/kernel/sched.c -+++ b/kernel/sched.c -@@ -78,6 +78,7 @@ - - #include "sched_cpupri.h" - #include "workqueue_sched.h" -+#include "sched_autogroup.h" - - #define CREATE_TRACE_POINTS - #include -@@ -605,11 +606,14 @@ static inline int cpu_of(struct rq *rq) - */ - static inline struct task_group *task_group(struct task_struct *p) - { -+ struct task_group *tg; - struct cgroup_subsys_state *css; - - css = task_subsys_state_check(p, cpu_cgroup_subsys_id, - lockdep_is_held(&task_rq(p)->lock)); -- return container_of(css, struct task_group, css); -+ tg = container_of(css, struct task_group, css); -+ -+ return autogroup_task_group(p, tg); - } - - /* Change a task's cfs_rq and parent entity if it moves across CPUs/groups */ -@@ -2006,6 +2010,7 @@ static void sched_irq_time_avg_update(struct rq *rq, u64 curr_irq_time) { } - #include "sched_idletask.c" - #include "sched_fair.c" - #include "sched_rt.c" -+#include "sched_autogroup.c" - #include "sched_stoptask.c" - #ifdef CONFIG_SCHED_DEBUG - # include "sched_debug.c" -@@ -7979,7 +7984,7 @@ void __init sched_init(void) - #ifdef CONFIG_CGROUP_SCHED - list_add(&init_task_group.list, &task_groups); - INIT_LIST_HEAD(&init_task_group.children); -- -+ autogroup_init(&init_task); - #endif /* CONFIG_CGROUP_SCHED */ - - #if defined CONFIG_FAIR_GROUP_SCHED && defined CONFIG_SMP -@@ -8509,15 +8514,11 @@ void sched_destroy_group(struct task_group *tg) - /* change task's runqueue when it moves between groups. - * The caller of this function should have put the task in its new group - * by now. This function just updates tsk->se.cfs_rq and tsk->se.parent to -- * reflect its new group. -+ * reflect its new group. Called with the runqueue lock held. - */ --void sched_move_task(struct task_struct *tsk) -+void __sched_move_task(struct task_struct *tsk, struct rq *rq) - { - int on_rq, running; -- unsigned long flags; -- struct rq *rq; -- -- rq = task_rq_lock(tsk, &flags); - - running = task_current(rq, tsk); - on_rq = tsk->se.on_rq; -@@ -8538,7 +8539,15 @@ void sched_move_task(struct task_struct *tsk) - tsk->sched_class->set_curr_task(rq); - if (on_rq) - enqueue_task(rq, tsk, 0); -+} - -+void sched_move_task(struct task_struct *tsk) -+{ -+ struct rq *rq; -+ unsigned long flags; -+ -+ rq = task_rq_lock(tsk, &flags); -+ __sched_move_task(tsk, rq); - task_rq_unlock(rq, &flags); - } - #endif /* CONFIG_CGROUP_SCHED */ -diff --git a/kernel/sched_autogroup.c b/kernel/sched_autogroup.c -new file mode 100644 -index 0000000..62f1d0e ---- /dev/null -+++ b/kernel/sched_autogroup.c -@@ -0,0 +1,140 @@ -+#ifdef CONFIG_SCHED_AUTOGROUP -+ -+unsigned int __read_mostly sysctl_sched_autogroup_enabled = 1; -+ -+struct autogroup { -+ struct kref kref; -+ struct task_group *tg; -+}; -+ -+static struct autogroup autogroup_default; -+ -+static void autogroup_init(struct task_struct *init_task) -+{ -+ autogroup_default.tg = &init_task_group; -+ kref_init(&autogroup_default.kref); -+ init_task->signal->autogroup = &autogroup_default; -+} -+ -+static inline void autogroup_destroy(struct kref *kref) -+{ -+ struct autogroup *ag = container_of(kref, struct autogroup, kref); -+ struct task_group *tg = ag->tg; -+ -+ kfree(ag); -+ sched_destroy_group(tg); -+} -+ -+static inline void autogroup_kref_put(struct autogroup *ag) -+{ -+ kref_put(&ag->kref, autogroup_destroy); -+} -+ -+static inline struct autogroup *autogroup_kref_get(struct autogroup *ag) -+{ -+ kref_get(&ag->kref); -+ return ag; -+} -+ -+static inline struct autogroup *autogroup_create(void) -+{ -+ struct autogroup *ag = kmalloc(sizeof(*ag), GFP_KERNEL); -+ -+ if (!ag) -+ goto out_fail; -+ -+ ag->tg = sched_create_group(&init_task_group); -+ kref_init(&ag->kref); -+ -+ if (!(IS_ERR(ag->tg))) -+ return ag; -+ -+out_fail: -+ if (ag) { -+ kfree(ag); -+ WARN_ON(1); -+ } else -+ WARN_ON(1); -+ -+ return autogroup_kref_get(&autogroup_default); -+} -+ -+static inline struct task_group * -+autogroup_task_group(struct task_struct *p, struct task_group *tg) -+{ -+ int enabled = ACCESS_ONCE(sysctl_sched_autogroup_enabled); -+ -+ enabled &= (tg == &root_task_group); -+ enabled &= (p->sched_class == &fair_sched_class); -+ enabled &= (!(p->flags & PF_EXITING)); -+ -+ if (enabled) -+ return p->signal->autogroup->tg; -+ -+ return tg; -+} -+ -+static void -+autogroup_move_group(struct task_struct *p, struct autogroup *ag) -+{ -+ struct autogroup *prev; -+ struct task_struct *t; -+ struct rq *rq; -+ unsigned long flags; -+ -+ rq = task_rq_lock(p, &flags); -+ prev = p->signal->autogroup; -+ if (prev == ag) { -+ task_rq_unlock(rq, &flags); -+ return; -+ } -+ -+ p->signal->autogroup = autogroup_kref_get(ag); -+ __sched_move_task(p, rq); -+ task_rq_unlock(rq, &flags); -+ -+ rcu_read_lock(); -+ list_for_each_entry_rcu(t, &p->thread_group, thread_group) { -+ sched_move_task(t); -+ } -+ rcu_read_unlock(); -+ -+ autogroup_kref_put(prev); -+} -+ -+void sched_autogroup_create_attach(struct task_struct *p) -+{ -+ struct autogroup *ag = autogroup_create(); -+ -+ autogroup_move_group(p, ag); -+ /* drop extra refrence added by autogroup_create() */ -+ autogroup_kref_put(ag); -+} -+EXPORT_SYMBOL(sched_autogroup_create_attach); -+ -+/* currently has no users */ -+void sched_autogroup_detach(struct task_struct *p) -+{ -+ autogroup_move_group(p, &autogroup_default); -+} -+EXPORT_SYMBOL(sched_autogroup_detach); -+ -+void sched_autogroup_fork(struct signal_struct *sig) -+{ -+ sig->autogroup = autogroup_kref_get(current->signal->autogroup); -+} -+ -+void sched_autogroup_exit(struct signal_struct *sig) -+{ -+ autogroup_kref_put(sig->autogroup); -+} -+ -+static int __init setup_autogroup(char *str) -+{ -+ sysctl_sched_autogroup_enabled = 0; -+ -+ return 1; -+} -+ -+__setup("noautogroup", setup_autogroup); -+#endif -diff --git a/kernel/sched_autogroup.h b/kernel/sched_autogroup.h -new file mode 100644 -index 0000000..6048f5d ---- /dev/null -+++ b/kernel/sched_autogroup.h -@@ -0,0 +1,18 @@ -+#ifdef CONFIG_SCHED_AUTOGROUP -+ -+static void __sched_move_task(struct task_struct *tsk, struct rq *rq); -+ -+static inline struct task_group * -+autogroup_task_group(struct task_struct *p, struct task_group *tg); -+ -+#else /* !CONFIG_SCHED_AUTOGROUP */ -+ -+static inline void autogroup_init(struct task_struct *init_task) { } -+ -+static inline struct task_group * -+autogroup_task_group(struct task_struct *p, struct task_group *tg) -+{ -+ return tg; -+} -+ -+#endif /* CONFIG_SCHED_AUTOGROUP */ -diff --git a/kernel/sysctl.c b/kernel/sysctl.c -index 5abfa15..b162f65 100644 ---- a/kernel/sysctl.c -+++ b/kernel/sysctl.c -@@ -382,6 +382,17 @@ static struct ctl_table kern_table[] = { - .mode = 0644, - .proc_handler = proc_dointvec, - }, -+#ifdef CONFIG_SCHED_AUTOGROUP -+ { -+ .procname = "sched_autogroup_enabled", -+ .data = &sysctl_sched_autogroup_enabled, -+ .maxlen = sizeof(unsigned int), -+ .mode = 0644, -+ .proc_handler = proc_dointvec, -+ .extra1 = &zero, -+ .extra2 = &one, -+ }, -+#endif - #ifdef CONFIG_PROVE_LOCKING - { - .procname = "prove_locking", --- -1.6.6.1 - diff --git a/recipes/linux/linux-omap-2.6.37rc/0008-ARM-OMAP-add-omap_rev_-macros.patch b/recipes/linux/linux-omap-2.6.37rc/0008-ARM-OMAP-add-omap_rev_-macros.patch deleted file mode 100644 index 4260282e29..0000000000 --- a/recipes/linux/linux-omap-2.6.37rc/0008-ARM-OMAP-add-omap_rev_-macros.patch +++ /dev/null @@ -1,81 +0,0 @@ -From 020068c783093a74ef15086afc6405e44676bbd2 Mon Sep 17 00:00:00 2001 -From: Koen Kooi -Date: Tue, 23 Nov 2010 11:40:20 +0100 -Subject: [PATCH 08/14] ARM: OMAP: add omap_rev_* macros - -This is just to make the SGX modules build that depend on omap_rev_lt_3_0 - -Signed-off-by: Koen Kooi ---- - arch/arm/plat-omap/include/plat/cpu.h | 55 +++++++++++++++++++++++++++++++++ - 1 files changed, 55 insertions(+), 0 deletions(-) - -diff --git a/arch/arm/plat-omap/include/plat/cpu.h b/arch/arm/plat-omap/include/plat/cpu.h -index 3fd8b40..1a8c347 100644 ---- a/arch/arm/plat-omap/include/plat/cpu.h -+++ b/arch/arm/plat-omap/include/plat/cpu.h -@@ -394,6 +394,61 @@ IS_OMAP_TYPE(3517, 0x3517) - #define OMAP4430_REV_ES2_0 0x44301044 - - /* -+ * Silicon revisions -+ */ -+#define OMAP_ES_1_0 0x00 -+#define OMAP_ES_2_0 0x10 -+#define OMAP_ES_2_1 0x20 -+#define OMAP_ES_3_0 0x30 -+#define OMAP_ES_3_1 0x40 -+ -+#define OMAP_REV_MASK 0x0000ff00 -+#define OMAP_REV_BITS ((omap_rev() & OMAP_REV_MASK) >> 8) -+ -+#define OMAP_REV_IS(revid) \ -+static inline u8 omap_rev_is_ ##revid (void) \ -+{ \ -+ return (OMAP_REV_BITS == OMAP_ES_ ##revid) ? 1 : 0; \ -+} -+ -+#define OMAP_REV_LT(revid) \ -+static inline u8 omap_rev_lt_ ##revid (void) \ -+{ \ -+ return (OMAP_REV_BITS < OMAP_ES_ ##revid) ? 1 : 0; \ -+} -+ -+#define OMAP_REV_LE(revid) \ -+static inline u8 omap_rev_le_ ##revid (void) \ -+{ \ -+ return (OMAP_REV_BITS <= OMAP_ES_ ##revid) ? 1 : 0; \ -+} -+ -+#define OMAP_REV_GT(revid) \ -+static inline u8 omap_rev_gt_ ##revid (void) \ -+{ \ -+ return (OMAP_REV_BITS > OMAP_ES_ ##revid) ? 1 : 0; \ -+} -+ -+#define OMAP_REV_GE(revid) \ -+static inline u8 omap_rev_ge_ ##revid (void) \ -+{ \ -+ return (OMAP_REV_BITS >= OMAP_ES_ ##revid) ? 1 : 0; \ -+} -+ -+#define OMAP_REV_FUNCTIONS(revid) \ -+ OMAP_REV_IS(revid) \ -+ OMAP_REV_LT(revid) \ -+ OMAP_REV_LE(revid) \ -+ OMAP_REV_GT(revid) \ -+ OMAP_REV_GE(revid) -+ -+OMAP_REV_FUNCTIONS(1_0) -+OMAP_REV_FUNCTIONS(2_0) -+OMAP_REV_FUNCTIONS(2_1) -+OMAP_REV_FUNCTIONS(3_0) -+OMAP_REV_FUNCTIONS(3_1) -+ -+/* - * omap_chip bits - * - * CHIP_IS_OMAP{2420,2430,3430} indicate that a particular structure is --- -1.6.6.1 - diff --git a/recipes/linux/linux-omap-2.6.37rc/0008-Miracle-patch.patch b/recipes/linux/linux-omap-2.6.37rc/0008-Miracle-patch.patch new file mode 100644 index 0000000000..d8e4c741fa --- /dev/null +++ b/recipes/linux/linux-omap-2.6.37rc/0008-Miracle-patch.patch @@ -0,0 +1,504 @@ +From f7410950ad86e2b70fca1b02e4c4097fe9280bef Mon Sep 17 00:00:00 2001 +From: Mike Galbraith +Date: Fri, 19 Nov 2010 12:52:42 +0100 +Subject: [PATCH 08/11] Miracle patch +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +On Sun, 2010-11-14 at 16:26 -0800, Linus Torvalds wrote: +> On Sun, Nov 14, 2010 at 4:15 PM, Linus Torvalds +> wrote: +> > +> > THAT is why I think it's so silly to try to be so strict and walk over +> > all processes while holding a couple of spinlocks. +> +> Btw, let me say that I think the patch is great even with that thing +> in. It looks clean, the thing I'm complaining about is not a big deal, +> and it seems to perform very much as advertized. The difference with +> autogroup scheduling is very noticeable with a simple "make -j64" +> kernel compile. +> +> So I really don't think it's a big deal. The sysctl handler isn't even +> complicated. But boy does it hurt my eyes to see a spinlock held +> around a "do_each_thread()". And I do get the feeling that the +> simplest way to fix it would be to just remove the code entirely, and +> just say that "enabling/disabling may be delayed for old processes +> with existing autogroups". + +Which is what I just did. If the oddball case isn't a big deal, the +patch shrinks, which is a good thing. I just wanted to cover all bases. + +Patchlet with handler whacked: + +A recurring complaint from CFS users is that parallel kbuild has a negative +impact on desktop interactivity. This patch implements an idea from Linus, +to automatically create task groups. This patch only implements Linus' per +tty task group suggestion, and only for fair class tasks, but leaves the way +open for enhancement. + +Implementation: each task's signal struct contains an inherited pointer to a +refcounted autogroup struct containing a task group pointer, the default for +all tasks pointing to the init_task_group. When a task calls __proc_set_tty(), +the process wide reference to the default group is dropped, a new task group is +created, and the process is moved into the new task group. Children thereafter +inherit this task group, and increase it's refcount. On exit, a reference to the +current task group is dropped when the last reference to each signal struct is +dropped. The task group is destroyed when the last signal struct referencing +it is freed. At runqueue selection time, IFF a task has no cgroup assignment, +it's current autogroup is used. + +The feature is enabled from boot by default if CONFIG_SCHED_AUTOGROUP is +selected, but can be disabled via the boot option noautogroup, and can be +also be turned on/off on the fly via.. + echo [01] > /proc/sys/kernel/sched_autogroup_enabled. +..which will automatically move tasks to/from the root task group. + +Some numbers. + +A 100% hog overhead measurement proggy pinned to the same CPU as a make -j10 + +About measurement proggy: + pert/sec = perturbations/sec + min/max/avg = scheduler service latencies in usecs + sum/s = time accrued by the competition per sample period (1 sec here) + overhead = %CPU received by the competition per sample period + +pert/s: 31 >40475.37us: 3 min: 0.37 max:48103.60 avg:29573.74 sum/s:916786us overhead:90.24% +pert/s: 23 >41237.70us: 12 min: 0.36 max:56010.39 avg:40187.01 sum/s:924301us overhead:91.99% +pert/s: 24 >42150.22us: 12 min: 8.86 max:61265.91 avg:39459.91 sum/s:947038us overhead:92.20% +pert/s: 26 >42344.91us: 11 min: 3.83 max:52029.60 avg:36164.70 sum/s:940282us overhead:91.12% +pert/s: 24 >44262.90us: 14 min: 5.05 max:82735.15 avg:40314.33 sum/s:967544us overhead:92.22% + +Same load with this patch applied. + +pert/s: 229 >5484.43us: 41 min: 0.15 max:12069.42 avg:2193.81 sum/s:502382us overhead:50.24% +pert/s: 222 >5652.28us: 43 min: 0.46 max:12077.31 avg:2248.56 sum/s:499181us overhead:49.92% +pert/s: 211 >5809.38us: 43 min: 0.16 max:12064.78 avg:2381.70 sum/s:502538us overhead:50.25% +pert/s: 223 >6147.92us: 43 min: 0.15 max:16107.46 avg:2282.17 sum/s:508925us overhead:50.49% +pert/s: 218 >6252.64us: 43 min: 0.16 max:12066.13 avg:2324.11 sum/s:506656us overhead:50.27% + +Average service latency is an order of magnitude better with autogroup. +(Imagine that pert were Xorg or whatnot instead) + +Using Mathieu Desnoyers' wakeup-latency testcase: + +With taskset -c 3 make -j 10 running.. + +taskset -c 3 ./wakeup-latency& sleep 30;killall wakeup-latency + +without: +maximum latency: 42963.2 µs +average latency: 9077.0 µs +missed timer events: 0 + +with: +maximum latency: 4160.7 µs +average latency: 149.4 µs +missed timer events: 0 + +Signed-off-by: Mike Galbraith +--- + Documentation/kernel-parameters.txt | 2 + + drivers/tty/tty_io.c | 1 + + include/linux/sched.h | 19 +++++ + init/Kconfig | 12 +++ + kernel/fork.c | 5 +- + kernel/sched.c | 25 ++++-- + kernel/sched_autogroup.c | 140 +++++++++++++++++++++++++++++++++++ + kernel/sched_autogroup.h | 18 +++++ + kernel/sysctl.c | 11 +++ + 9 files changed, 224 insertions(+), 9 deletions(-) + create mode 100644 kernel/sched_autogroup.c + create mode 100644 kernel/sched_autogroup.h + +diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt +index cdd2a6e..b79a8fb 100644 +--- a/Documentation/kernel-parameters.txt ++++ b/Documentation/kernel-parameters.txt +@@ -1622,6 +1622,8 @@ and is between 256 and 4096 characters. It is defined in the file + noapic [SMP,APIC] Tells the kernel to not make use of any + IOAPICs that may be present in the system. + ++ noautogroup Disable scheduler automatic task group creation. ++ + nobats [PPC] Do not use BATs for mapping kernel lowmem + on "Classic" PPC cores. + +diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c +index 35480dd..1849f4a 100644 +--- a/drivers/tty/tty_io.c ++++ b/drivers/tty/tty_io.c +@@ -3169,6 +3169,7 @@ static void __proc_set_tty(struct task_struct *tsk, struct tty_struct *tty) + put_pid(tsk->signal->tty_old_pgrp); + tsk->signal->tty = tty_kref_get(tty); + tsk->signal->tty_old_pgrp = NULL; ++ sched_autogroup_create_attach(tsk); + } + + static void proc_set_tty(struct task_struct *tsk, struct tty_struct *tty) +diff --git a/include/linux/sched.h b/include/linux/sched.h +index 2c79e92..1e677c2 100644 +--- a/include/linux/sched.h ++++ b/include/linux/sched.h +@@ -509,6 +509,8 @@ struct thread_group_cputimer { + spinlock_t lock; + }; + ++struct autogroup; ++ + /* + * NOTE! "signal_struct" does not have it's own + * locking, because a shared signal_struct always +@@ -576,6 +578,9 @@ struct signal_struct { + + struct tty_struct *tty; /* NULL if no tty */ + ++#ifdef CONFIG_SCHED_AUTOGROUP ++ struct autogroup *autogroup; ++#endif + /* + * Cumulative resource counters for dead threads in the group, + * and for reaped dead child processes forked by this group. +@@ -1931,6 +1936,20 @@ int sched_rt_handler(struct ctl_table *table, int write, + + extern unsigned int sysctl_sched_compat_yield; + ++#ifdef CONFIG_SCHED_AUTOGROUP ++extern unsigned int sysctl_sched_autogroup_enabled; ++ ++extern void sched_autogroup_create_attach(struct task_struct *p); ++extern void sched_autogroup_detach(struct task_struct *p); ++extern void sched_autogroup_fork(struct signal_struct *sig); ++extern void sched_autogroup_exit(struct signal_struct *sig); ++#else ++static inline void sched_autogroup_create_attach(struct task_struct *p) { } ++static inline void sched_autogroup_detach(struct task_struct *p) { } ++static inline void sched_autogroup_fork(struct signal_struct *sig) { } ++static inline void sched_autogroup_exit(struct signal_struct *sig) { } ++#endif ++ + #ifdef CONFIG_RT_MUTEXES + extern int rt_mutex_getprio(struct task_struct *p); + extern void rt_mutex_setprio(struct task_struct *p, int prio); +diff --git a/init/Kconfig b/init/Kconfig +index c972899..a4985d9 100644 +--- a/init/Kconfig ++++ b/init/Kconfig +@@ -741,6 +741,18 @@ config NET_NS + + endif # NAMESPACES + ++config SCHED_AUTOGROUP ++ bool "Automatic process group scheduling" ++ select CGROUPS ++ select CGROUP_SCHED ++ select FAIR_GROUP_SCHED ++ help ++ This option optimizes the scheduler for common desktop workloads by ++ automatically creating and populating task groups. This separation ++ of workloads isolates aggressive CPU burners (like build jobs) from ++ desktop applications. Task group autogeneration is currently based ++ upon task tty association. ++ + config MM_OWNER + bool + +diff --git a/kernel/fork.c b/kernel/fork.c +index 3b159c5..b6f2475 100644 +--- a/kernel/fork.c ++++ b/kernel/fork.c +@@ -174,8 +174,10 @@ static inline void free_signal_struct(struct signal_struct *sig) + + static inline void put_signal_struct(struct signal_struct *sig) + { +- if (atomic_dec_and_test(&sig->sigcnt)) ++ if (atomic_dec_and_test(&sig->sigcnt)) { ++ sched_autogroup_exit(sig); + free_signal_struct(sig); ++ } + } + + void __put_task_struct(struct task_struct *tsk) +@@ -904,6 +906,7 @@ static int copy_signal(unsigned long clone_flags, struct task_struct *tsk) + posix_cpu_timers_init_group(sig); + + tty_audit_fork(sig); ++ sched_autogroup_fork(sig); + + sig->oom_adj = current->signal->oom_adj; + sig->oom_score_adj = current->signal->oom_score_adj; +diff --git a/kernel/sched.c b/kernel/sched.c +index dc91a4d..b4ed496 100644 +--- a/kernel/sched.c ++++ b/kernel/sched.c +@@ -78,6 +78,7 @@ + + #include "sched_cpupri.h" + #include "workqueue_sched.h" ++#include "sched_autogroup.h" + + #define CREATE_TRACE_POINTS + #include +@@ -605,11 +606,14 @@ static inline int cpu_of(struct rq *rq) + */ + static inline struct task_group *task_group(struct task_struct *p) + { ++ struct task_group *tg; + struct cgroup_subsys_state *css; + + css = task_subsys_state_check(p, cpu_cgroup_subsys_id, + lockdep_is_held(&task_rq(p)->lock)); +- return container_of(css, struct task_group, css); ++ tg = container_of(css, struct task_group, css); ++ ++ return autogroup_task_group(p, tg); + } + + /* Change a task's cfs_rq and parent entity if it moves across CPUs/groups */ +@@ -2006,6 +2010,7 @@ static void sched_irq_time_avg_update(struct rq *rq, u64 curr_irq_time) { } + #include "sched_idletask.c" + #include "sched_fair.c" + #include "sched_rt.c" ++#include "sched_autogroup.c" + #include "sched_stoptask.c" + #ifdef CONFIG_SCHED_DEBUG + # include "sched_debug.c" +@@ -7979,7 +7984,7 @@ void __init sched_init(void) + #ifdef CONFIG_CGROUP_SCHED + list_add(&init_task_group.list, &task_groups); + INIT_LIST_HEAD(&init_task_group.children); +- ++ autogroup_init(&init_task); + #endif /* CONFIG_CGROUP_SCHED */ + + #if defined CONFIG_FAIR_GROUP_SCHED && defined CONFIG_SMP +@@ -8509,15 +8514,11 @@ void sched_destroy_group(struct task_group *tg) + /* change task's runqueue when it moves between groups. + * The caller of this function should have put the task in its new group + * by now. This function just updates tsk->se.cfs_rq and tsk->se.parent to +- * reflect its new group. ++ * reflect its new group. Called with the runqueue lock held. + */ +-void sched_move_task(struct task_struct *tsk) ++void __sched_move_task(struct task_struct *tsk, struct rq *rq) + { + int on_rq, running; +- unsigned long flags; +- struct rq *rq; +- +- rq = task_rq_lock(tsk, &flags); + + running = task_current(rq, tsk); + on_rq = tsk->se.on_rq; +@@ -8538,7 +8539,15 @@ void sched_move_task(struct task_struct *tsk) + tsk->sched_class->set_curr_task(rq); + if (on_rq) + enqueue_task(rq, tsk, 0); ++} + ++void sched_move_task(struct task_struct *tsk) ++{ ++ struct rq *rq; ++ unsigned long flags; ++ ++ rq = task_rq_lock(tsk, &flags); ++ __sched_move_task(tsk, rq); + task_rq_unlock(rq, &flags); + } + #endif /* CONFIG_CGROUP_SCHED */ +diff --git a/kernel/sched_autogroup.c b/kernel/sched_autogroup.c +new file mode 100644 +index 0000000..62f1d0e +--- /dev/null ++++ b/kernel/sched_autogroup.c +@@ -0,0 +1,140 @@ ++#ifdef CONFIG_SCHED_AUTOGROUP ++ ++unsigned int __read_mostly sysctl_sched_autogroup_enabled = 1; ++ ++struct autogroup { ++ struct kref kref; ++ struct task_group *tg; ++}; ++ ++static struct autogroup autogroup_default; ++ ++static void autogroup_init(struct task_struct *init_task) ++{ ++ autogroup_default.tg = &init_task_group; ++ kref_init(&autogroup_default.kref); ++ init_task->signal->autogroup = &autogroup_default; ++} ++ ++static inline void autogroup_destroy(struct kref *kref) ++{ ++ struct autogroup *ag = container_of(kref, struct autogroup, kref); ++ struct task_group *tg = ag->tg; ++ ++ kfree(ag); ++ sched_destroy_group(tg); ++} ++ ++static inline void autogroup_kref_put(struct autogroup *ag) ++{ ++ kref_put(&ag->kref, autogroup_destroy); ++} ++ ++static inline struct autogroup *autogroup_kref_get(struct autogroup *ag) ++{ ++ kref_get(&ag->kref); ++ return ag; ++} ++ ++static inline struct autogroup *autogroup_create(void) ++{ ++ struct autogroup *ag = kmalloc(sizeof(*ag), GFP_KERNEL); ++ ++ if (!ag) ++ goto out_fail; ++ ++ ag->tg = sched_create_group(&init_task_group); ++ kref_init(&ag->kref); ++ ++ if (!(IS_ERR(ag->tg))) ++ return ag; ++ ++out_fail: ++ if (ag) { ++ kfree(ag); ++ WARN_ON(1); ++ } else ++ WARN_ON(1); ++ ++ return autogroup_kref_get(&autogroup_default); ++} ++ ++static inline struct task_group * ++autogroup_task_group(struct task_struct *p, struct task_group *tg) ++{ ++ int enabled = ACCESS_ONCE(sysctl_sched_autogroup_enabled); ++ ++ enabled &= (tg == &root_task_group); ++ enabled &= (p->sched_class == &fair_sched_class); ++ enabled &= (!(p->flags & PF_EXITING)); ++ ++ if (enabled) ++ return p->signal->autogroup->tg; ++ ++ return tg; ++} ++ ++static void ++autogroup_move_group(struct task_struct *p, struct autogroup *ag) ++{ ++ struct autogroup *prev; ++ struct task_struct *t; ++ struct rq *rq; ++ unsigned long flags; ++ ++ rq = task_rq_lock(p, &flags); ++ prev = p->signal->autogroup; ++ if (prev == ag) { ++ task_rq_unlock(rq, &flags); ++ return; ++ } ++ ++ p->signal->autogroup = autogroup_kref_get(ag); ++ __sched_move_task(p, rq); ++ task_rq_unlock(rq, &flags); ++ ++ rcu_read_lock(); ++ list_for_each_entry_rcu(t, &p->thread_group, thread_group) { ++ sched_move_task(t); ++ } ++ rcu_read_unlock(); ++ ++ autogroup_kref_put(prev); ++} ++ ++void sched_autogroup_create_attach(struct task_struct *p) ++{ ++ struct autogroup *ag = autogroup_create(); ++ ++ autogroup_move_group(p, ag); ++ /* drop extra refrence added by autogroup_create() */ ++ autogroup_kref_put(ag); ++} ++EXPORT_SYMBOL(sched_autogroup_create_attach); ++ ++/* currently has no users */ ++void sched_autogroup_detach(struct task_struct *p) ++{ ++ autogroup_move_group(p, &autogroup_default); ++} ++EXPORT_SYMBOL(sched_autogroup_detach); ++ ++void sched_autogroup_fork(struct signal_struct *sig) ++{ ++ sig->autogroup = autogroup_kref_get(current->signal->autogroup); ++} ++ ++void sched_autogroup_exit(struct signal_struct *sig) ++{ ++ autogroup_kref_put(sig->autogroup); ++} ++ ++static int __init setup_autogroup(char *str) ++{ ++ sysctl_sched_autogroup_enabled = 0; ++ ++ return 1; ++} ++ ++__setup("noautogroup", setup_autogroup); ++#endif +diff --git a/kernel/sched_autogroup.h b/kernel/sched_autogroup.h +new file mode 100644 +index 0000000..6048f5d +--- /dev/null ++++ b/kernel/sched_autogroup.h +@@ -0,0 +1,18 @@ ++#ifdef CONFIG_SCHED_AUTOGROUP ++ ++static void __sched_move_task(struct task_struct *tsk, struct rq *rq); ++ ++static inline struct task_group * ++autogroup_task_group(struct task_struct *p, struct task_group *tg); ++ ++#else /* !CONFIG_SCHED_AUTOGROUP */ ++ ++static inline void autogroup_init(struct task_struct *init_task) { } ++ ++static inline struct task_group * ++autogroup_task_group(struct task_struct *p, struct task_group *tg) ++{ ++ return tg; ++} ++ ++#endif /* CONFIG_SCHED_AUTOGROUP */ +diff --git a/kernel/sysctl.c b/kernel/sysctl.c +index 5abfa15..b162f65 100644 +--- a/kernel/sysctl.c ++++ b/kernel/sysctl.c +@@ -382,6 +382,17 @@ static struct ctl_table kern_table[] = { + .mode = 0644, + .proc_handler = proc_dointvec, + }, ++#ifdef CONFIG_SCHED_AUTOGROUP ++ { ++ .procname = "sched_autogroup_enabled", ++ .data = &sysctl_sched_autogroup_enabled, ++ .maxlen = sizeof(unsigned int), ++ .mode = 0644, ++ .proc_handler = proc_dointvec, ++ .extra1 = &zero, ++ .extra2 = &one, ++ }, ++#endif + #ifdef CONFIG_PROVE_LOCKING + { + .procname = "prove_locking", +-- +1.6.6.1 + diff --git a/recipes/linux/linux-omap-2.6.37rc/0009-ARM-OMAP-add-omap_rev_-macros.patch b/recipes/linux/linux-omap-2.6.37rc/0009-ARM-OMAP-add-omap_rev_-macros.patch new file mode 100644 index 0000000000..405e30c03b --- /dev/null +++ b/recipes/linux/linux-omap-2.6.37rc/0009-ARM-OMAP-add-omap_rev_-macros.patch @@ -0,0 +1,81 @@ +From 85ea664bbf0410eb8132be8427874761113457bc Mon Sep 17 00:00:00 2001 +From: Koen Kooi +Date: Tue, 23 Nov 2010 11:40:20 +0100 +Subject: [PATCH 09/11] ARM: OMAP: add omap_rev_* macros + +This is just to make the SGX modules build that depend on omap_rev_lt_3_0 + +Signed-off-by: Koen Kooi +--- + arch/arm/plat-omap/include/plat/cpu.h | 55 +++++++++++++++++++++++++++++++++ + 1 files changed, 55 insertions(+), 0 deletions(-) + +diff --git a/arch/arm/plat-omap/include/plat/cpu.h b/arch/arm/plat-omap/include/plat/cpu.h +index 3fd8b40..1a8c347 100644 +--- a/arch/arm/plat-omap/include/plat/cpu.h ++++ b/arch/arm/plat-omap/include/plat/cpu.h +@@ -394,6 +394,61 @@ IS_OMAP_TYPE(3517, 0x3517) + #define OMAP4430_REV_ES2_0 0x44301044 + + /* ++ * Silicon revisions ++ */ ++#define OMAP_ES_1_0 0x00 ++#define OMAP_ES_2_0 0x10 ++#define OMAP_ES_2_1 0x20 ++#define OMAP_ES_3_0 0x30 ++#define OMAP_ES_3_1 0x40 ++ ++#define OMAP_REV_MASK 0x0000ff00 ++#define OMAP_REV_BITS ((omap_rev() & OMAP_REV_MASK) >> 8) ++ ++#define OMAP_REV_IS(revid) \ ++static inline u8 omap_rev_is_ ##revid (void) \ ++{ \ ++ return (OMAP_REV_BITS == OMAP_ES_ ##revid) ? 1 : 0; \ ++} ++ ++#define OMAP_REV_LT(revid) \ ++static inline u8 omap_rev_lt_ ##revid (void) \ ++{ \ ++ return (OMAP_REV_BITS < OMAP_ES_ ##revid) ? 1 : 0; \ ++} ++ ++#define OMAP_REV_LE(revid) \ ++static inline u8 omap_rev_le_ ##revid (void) \ ++{ \ ++ return (OMAP_REV_BITS <= OMAP_ES_ ##revid) ? 1 : 0; \ ++} ++ ++#define OMAP_REV_GT(revid) \ ++static inline u8 omap_rev_gt_ ##revid (void) \ ++{ \ ++ return (OMAP_REV_BITS > OMAP_ES_ ##revid) ? 1 : 0; \ ++} ++ ++#define OMAP_REV_GE(revid) \ ++static inline u8 omap_rev_ge_ ##revid (void) \ ++{ \ ++ return (OMAP_REV_BITS >= OMAP_ES_ ##revid) ? 1 : 0; \ ++} ++ ++#define OMAP_REV_FUNCTIONS(revid) \ ++ OMAP_REV_IS(revid) \ ++ OMAP_REV_LT(revid) \ ++ OMAP_REV_LE(revid) \ ++ OMAP_REV_GT(revid) \ ++ OMAP_REV_GE(revid) ++ ++OMAP_REV_FUNCTIONS(1_0) ++OMAP_REV_FUNCTIONS(2_0) ++OMAP_REV_FUNCTIONS(2_1) ++OMAP_REV_FUNCTIONS(3_0) ++OMAP_REV_FUNCTIONS(3_1) ++ ++/* + * omap_chip bits + * + * CHIP_IS_OMAP{2420,2430,3430} indicate that a particular structure is +-- +1.6.6.1 + diff --git a/recipes/linux/linux-omap-2.6.37rc/0009-omap-Beagle-detect-new-xM-revision-B.patch b/recipes/linux/linux-omap-2.6.37rc/0009-omap-Beagle-detect-new-xM-revision-B.patch deleted file mode 100644 index d2a64a87aa..0000000000 --- a/recipes/linux/linux-omap-2.6.37rc/0009-omap-Beagle-detect-new-xM-revision-B.patch +++ /dev/null @@ -1,43 +0,0 @@ -From c5d20d17936c53b62603cdc8a9cf771bc5c6fcd2 Mon Sep 17 00:00:00 2001 -From: Robert Nelson -Date: Tue, 9 Nov 2010 08:34:55 -0600 -Subject: [PATCH 09/14] omap: Beagle: detect new xM revision B - -The xM B uses a DM3730 ES1.1 over the ES1.0 on xM A's, no other board changes. - -Signed-off-by: Robert Nelson -Signed-off-by: Koen Kooi ---- - arch/arm/mach-omap2/board-omap3beagle.c | 9 +++++++-- - 1 files changed, 7 insertions(+), 2 deletions(-) - -diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c -index 6d7f008..f63f319 100644 ---- a/arch/arm/mach-omap2/board-omap3beagle.c -+++ b/arch/arm/mach-omap2/board-omap3beagle.c -@@ -59,7 +59,8 @@ - * AXBX = GPIO173, GPIO172, GPIO171: 1 1 1 - * C1_3 = GPIO173, GPIO172, GPIO171: 1 1 0 - * C4 = GPIO173, GPIO172, GPIO171: 1 0 1 -- * XM = GPIO173, GPIO172, GPIO171: 0 0 0 -+ * XMA = GPIO173, GPIO172, GPIO171: 0 0 0 -+ * XMB = GPIO173, GPIO172, GPIO171: 0 0 1 - */ - enum { - OMAP3BEAGLE_BOARD_UNKN = 0, -@@ -118,7 +119,11 @@ static void __init omap3_beagle_init_rev(void) - omap3_beagle_version = OMAP3BEAGLE_BOARD_C4; - break; - case 0: -- printk(KERN_INFO "OMAP3 Beagle Rev: xM\n"); -+ printk(KERN_INFO "OMAP3 Beagle Rev: xM A\n"); -+ omap3_beagle_version = OMAP3BEAGLE_BOARD_XM; -+ break; -+ case 1: -+ printk(KERN_INFO "OMAP3 Beagle Rev: xM B\n"); - omap3_beagle_version = OMAP3BEAGLE_BOARD_XM; - break; - default: --- -1.6.6.1 - diff --git a/recipes/linux/linux-omap-2.6.37rc/0010-OMAP-DSS2-enable-hsclk-in-dsi_pll_init-for-OMAP36XX.patch b/recipes/linux/linux-omap-2.6.37rc/0010-OMAP-DSS2-enable-hsclk-in-dsi_pll_init-for-OMAP36XX.patch index 224d43be10..7594c0309a 100644 --- a/recipes/linux/linux-omap-2.6.37rc/0010-OMAP-DSS2-enable-hsclk-in-dsi_pll_init-for-OMAP36XX.patch +++ b/recipes/linux/linux-omap-2.6.37rc/0010-OMAP-DSS2-enable-hsclk-in-dsi_pll_init-for-OMAP36XX.patch @@ -1,7 +1,7 @@ -From 033209b9aceb9a2dc395e70f49eee9f7b406bb90 Mon Sep 17 00:00:00 2001 +From 99db14dd71d9681b52647edaffefd5dd951b1672 Mon Sep 17 00:00:00 2001 From: Steve Sakoman Date: Mon, 10 May 2010 20:44:09 -0700 -Subject: [PATCH 10/14] OMAP: DSS2: enable hsclk in dsi_pll_init for OMAP36XX +Subject: [PATCH 10/11] OMAP: DSS2: enable hsclk in dsi_pll_init for OMAP36XX Signed-off-by: Koen Kooi --- diff --git a/recipes/linux/linux-omap-2.6.37rc/0011-AM37x-Switch-SGX-clocks-to-200MHz.patch b/recipes/linux/linux-omap-2.6.37rc/0011-AM37x-Switch-SGX-clocks-to-200MHz.patch new file mode 100644 index 0000000000..e4bfc63138 --- /dev/null +++ b/recipes/linux/linux-omap-2.6.37rc/0011-AM37x-Switch-SGX-clocks-to-200MHz.patch @@ -0,0 +1,29 @@ +From f98795ac746eb6681738e56fc8df0f126bfd5f2f Mon Sep 17 00:00:00 2001 +From: Prabindh Sundareson +Date: Thu, 3 Jun 2010 11:20:57 +0530 +Subject: [PATCH 11/11] AM37x: Switch SGX clocks to 200MHz + +Signed-off-by: Prabindh Sundareson +Signed-off-by: Koen Kooi +--- + arch/arm/mach-omap2/clock3xxx_data.c | 4 ++-- + 1 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/arch/arm/mach-omap2/clock3xxx_data.c b/arch/arm/mach-omap2/clock3xxx_data.c +index 0579604..f394b4f 100644 +--- a/arch/arm/mach-omap2/clock3xxx_data.c ++++ b/arch/arm/mach-omap2/clock3xxx_data.c +@@ -3267,8 +3267,8 @@ static struct omap_clk omap3xxx_clks[] = { + CLK(NULL, "gfx_l3_ick", &gfx_l3_ick, CK_3430ES1), + CLK(NULL, "gfx_cg1_ck", &gfx_cg1_ck, CK_3430ES1), + CLK(NULL, "gfx_cg2_ck", &gfx_cg2_ck, CK_3430ES1), +- CLK(NULL, "sgx_fck", &sgx_fck, CK_3430ES2 | CK_3517), +- CLK(NULL, "sgx_ick", &sgx_ick, CK_3430ES2 | CK_3517), ++ CLK(NULL, "sgx_fck", &sgx_fck, CK_3430ES2 | CK_3517 | CK_36XX), ++ CLK(NULL, "sgx_ick", &sgx_ick, CK_3430ES2 | CK_3517 | CK_36XX), + CLK(NULL, "d2d_26m_fck", &d2d_26m_fck, CK_3430ES1), + CLK(NULL, "modem_fck", &modem_fck, CK_343X), + CLK(NULL, "sad2d_ick", &sad2d_ick, CK_343X), +-- +1.6.6.1 + diff --git a/recipes/linux/linux-omap-2.6.37rc/0011-omap3-Increase-limit-on-bootarg-mpurate.patch b/recipes/linux/linux-omap-2.6.37rc/0011-omap3-Increase-limit-on-bootarg-mpurate.patch deleted file mode 100644 index 1cdf7a645f..0000000000 --- a/recipes/linux/linux-omap-2.6.37rc/0011-omap3-Increase-limit-on-bootarg-mpurate.patch +++ /dev/null @@ -1,33 +0,0 @@ -From cf1744b32411e18b41aa0de370c50057b577f4c7 Mon Sep 17 00:00:00 2001 -From: Sanjeev Premi -Date: Thu, 29 Apr 2010 14:09:42 +0530 -Subject: [PATCH 11/14] omap3: Increase limit on bootarg 'mpurate' - -The value of mpurate is currently expected to be less -than 1000 when specified in MHz. - -This patch raises this limit to 2000 to support 1GHz -capable processors. The new limit should be reasonable -for quite some time. - -Signed-off-by: Koen Kooi ---- - arch/arm/plat-omap/clock.c | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) - -diff --git a/arch/arm/plat-omap/clock.c b/arch/arm/plat-omap/clock.c -index fc62fb5..f3e3d29 100644 ---- a/arch/arm/plat-omap/clock.c -+++ b/arch/arm/plat-omap/clock.c -@@ -181,7 +181,7 @@ static int __init omap_clk_setup(char *str) - if (!mpurate) - return 1; - -- if (mpurate < 1000) -+ if (mpurate < 2000) - mpurate *= 1000000; - - return 1; --- -1.6.6.1 - diff --git a/recipes/linux/linux-omap-2.6.37rc/0012-AM37x-Switch-SGX-clocks-to-200MHz.patch b/recipes/linux/linux-omap-2.6.37rc/0012-AM37x-Switch-SGX-clocks-to-200MHz.patch deleted file mode 100644 index af27af617b..0000000000 --- a/recipes/linux/linux-omap-2.6.37rc/0012-AM37x-Switch-SGX-clocks-to-200MHz.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 2f7fbd88fbaf05433fc5a6e6a6c2897246a67af6 Mon Sep 17 00:00:00 2001 -From: Prabindh Sundareson -Date: Thu, 3 Jun 2010 11:20:57 +0530 -Subject: [PATCH 12/14] AM37x: Switch SGX clocks to 200MHz - -Signed-off-by: Prabindh Sundareson -Signed-off-by: Koen Kooi ---- - arch/arm/mach-omap2/clock3xxx_data.c | 4 ++-- - 1 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/arch/arm/mach-omap2/clock3xxx_data.c b/arch/arm/mach-omap2/clock3xxx_data.c -index a8c8c7a..a56f8e9 100644 ---- a/arch/arm/mach-omap2/clock3xxx_data.c -+++ b/arch/arm/mach-omap2/clock3xxx_data.c -@@ -3267,8 +3267,8 @@ static struct omap_clk omap3xxx_clks[] = { - CLK(NULL, "gfx_l3_ick", &gfx_l3_ick, CK_3430ES1), - CLK(NULL, "gfx_cg1_ck", &gfx_cg1_ck, CK_3430ES1), - CLK(NULL, "gfx_cg2_ck", &gfx_cg2_ck, CK_3430ES1), -- CLK(NULL, "sgx_fck", &sgx_fck, CK_3430ES2 | CK_3517), -- CLK(NULL, "sgx_ick", &sgx_ick, CK_3430ES2 | CK_3517), -+ CLK(NULL, "sgx_fck", &sgx_fck, CK_3430ES2 | CK_3517 | CK_36XX), -+ CLK(NULL, "sgx_ick", &sgx_ick, CK_3430ES2 | CK_3517 | CK_36XX), - CLK(NULL, "d2d_26m_fck", &d2d_26m_fck, CK_3430ES1), - CLK(NULL, "modem_fck", &modem_fck, CK_343X), - CLK(NULL, "sad2d_ick", &sad2d_ick, CK_343X), --- -1.6.6.1 - diff --git a/recipes/linux/linux-omap-2.6.37rc/0013-ARM-OMAP-Beagle-clarify-CAM_EN-power.patch b/recipes/linux/linux-omap-2.6.37rc/0013-ARM-OMAP-Beagle-clarify-CAM_EN-power.patch deleted file mode 100644 index c637421e1e..0000000000 --- a/recipes/linux/linux-omap-2.6.37rc/0013-ARM-OMAP-Beagle-clarify-CAM_EN-power.patch +++ /dev/null @@ -1,26 +0,0 @@ -From ba1cb56e706e5a7291eb43f3a3cc566def5a4e28 Mon Sep 17 00:00:00 2001 -From: Koen Kooi -Date: Sun, 5 Dec 2010 13:23:04 +0100 -Subject: [PATCH 13/14] ARM: OMAP: Beagle: clarify CAM_EN power - -Signed-off-by: Koen Kooi ---- - arch/arm/mach-omap2/board-omap3beagle.c | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) - -diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c -index f63f319..c3f8b69 100644 ---- a/arch/arm/mach-omap2/board-omap3beagle.c -+++ b/arch/arm/mach-omap2/board-omap3beagle.c -@@ -417,7 +417,7 @@ static int beagle_twl_gpio_setup(struct device *dev, - gpio_direction_output(gpio + 1, 0); - } - -- /* Power on camera interface */ -+ /* Power on camera interface on P7/P8 or DVI on A2 and beyond */ - if (omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XM) { - gpio_request(gpio + 2, "CAM_EN"); - gpio_direction_output(gpio + 2, 1); --- -1.6.6.1 - diff --git a/recipes/linux/linux-omap-2.6.37rc/0014-ARM-OMAP-beagleboard-pre-export-GPIOs-to-userspace-w.patch b/recipes/linux/linux-omap-2.6.37rc/0014-ARM-OMAP-beagleboard-pre-export-GPIOs-to-userspace-w.patch deleted file mode 100644 index ae98923457..0000000000 --- a/recipes/linux/linux-omap-2.6.37rc/0014-ARM-OMAP-beagleboard-pre-export-GPIOs-to-userspace-w.patch +++ /dev/null @@ -1,57 +0,0 @@ -From 8b3ec1b570be50d4488c2b865dc76ef47eccf699 Mon Sep 17 00:00:00 2001 -From: Koen Kooi -Date: Sun, 5 Dec 2010 13:25:00 +0100 -Subject: [PATCH 14/14] ARM: OMAP: beagleboard: pre-export GPIOs to userspace when using a Tincantools trainerboard - -This really needs a for loop, patches welcome - -Signed-off-by: Koen Kooi ---- - arch/arm/mach-omap2/board-omap3beagle.c | 31 +++++++++++++++++++++++++++++++ - 1 files changed, 31 insertions(+), 0 deletions(-) - -diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c -index c3f8b69..60e7fa6 100644 ---- a/arch/arm/mach-omap2/board-omap3beagle.c -+++ b/arch/arm/mach-omap2/board-omap3beagle.c -@@ -729,6 +729,37 @@ static void __init omap3_beagle_init(void) - mmc[1].gpio_cd = 162; - } - -+ if(!strcmp(expansionboard_name, "trainer")) -+ { -+ printk(KERN_INFO "Beagle expansionboard: exporting GPIOs 130-141,162 to userspace\n"); -+ gpio_request(130, "sysfs"); -+ gpio_export(130, 1); -+ gpio_request(131, "sysfs"); -+ gpio_export(131, 1); -+ gpio_request(132, "sysfs"); -+ gpio_export(132, 1); -+ gpio_request(133, "sysfs"); -+ gpio_export(133, 1); -+ gpio_request(134, "sysfs"); -+ gpio_export(134, 1); -+ gpio_request(135, "sysfs"); -+ gpio_export(135, 1); -+ gpio_request(136, "sysfs"); -+ gpio_export(136, 1); -+ gpio_request(137, "sysfs"); -+ gpio_export(137, 1); -+ gpio_request(138, "sysfs"); -+ gpio_export(138, 1); -+ gpio_request(139, "sysfs"); -+ gpio_export(139, 1); -+ gpio_request(140, "sysfs"); -+ gpio_export(140, 1); -+ gpio_request(141, "sysfs"); -+ gpio_export(141, 1); -+ gpio_request(162, "sysfs"); -+ gpio_export(162, 1); -+ } -+ - usb_musb_init(&musb_board_data); - usb_ehci_init(&ehci_pdata); - omap3beagle_flash_init(); --- -1.6.6.1 - diff --git a/recipes/linux/linux-omap_2.6.37rc.bb b/recipes/linux/linux-omap_2.6.37rc.bb index 72fb17a68d..6bf1cc87d6 100644 --- a/recipes/linux/linux-omap_2.6.37rc.bb +++ b/recipes/linux/linux-omap_2.6.37rc.bb @@ -6,9 +6,9 @@ KERNEL_IMAGETYPE = "uImage" COMPATIBLE_MACHINE = "beagleboard" # The main PR is now using MACHINE_KERNEL_PR, for omap3 see conf/machine/include/omap3.inc -PV = "2.6.36+2.6.37-rc4" -MACHINE_KERNEL_PR_append = "b+gitr${SRCREV}" -SRCREV = "a04fd22204b13ce34a3f8a8157f83c44d64f8da9" +PV = "2.6.36+2.6.37-rc5" +MACHINE_KERNEL_PR_append = "a+gitr${SRCREV}" +SRCREV = "f306749fced39b0c71d191ca53a1d4350477df64" FILESPATHPKG_prepend = "linux-omap-2.6.37rc:" @@ -16,20 +16,17 @@ SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6.g file://defconfig" SRC_URI_append = " \ - file://0001-ARM-OMAP-beagleboard-Add-infrastructure-to-do-fixups.patch \ - file://0002-modedb.c-add-proper-720p60-mode.patch \ - file://0003-ARM-OMAP-fix-USB-initialization-for-beagleboard-xM.patch \ - file://0004-ARM-OMAP-Power-on-EHCI-serial-camera-and-DVI-on-beag.patch \ - file://0005-mmc-don-t-display-single-block-read-console-messages.patch \ - file://0006-MTD-silence-ecc-errors-on-mtdblock0.patch \ - file://0007-Miracle-patch.patch \ - file://0008-ARM-OMAP-add-omap_rev_-macros.patch \ - file://0009-omap-Beagle-detect-new-xM-revision-B.patch \ + file://0001-ARM-OMAP-Power-on-EHCI-serial-camera-and-DVI-on-beag.patch \ + file://0002-omap-Beagle-detect-new-xM-revision-B.patch \ + file://0003-ARM-OMAP-beagleboard-Add-infrastructure-to-do-fixups.patch \ + file://0004-ARM-OMAP-beagleboard-pre-export-GPIOs-to-userspace-w.patch \ + file://0005-modedb.c-add-proper-720p60-mode.patch \ + file://0006-mmc-don-t-display-single-block-read-console-messages.patch \ + file://0007-MTD-silence-ecc-errors-on-mtdblock0.patch \ + file://0008-Miracle-patch.patch \ + file://0009-ARM-OMAP-add-omap_rev_-macros.patch \ file://0010-OMAP-DSS2-enable-hsclk-in-dsi_pll_init-for-OMAP36XX.patch \ -# file://0011-omap3-Increase-limit-on-bootarg-mpurate.patch \ - file://0012-AM37x-Switch-SGX-clocks-to-200MHz.patch \ - file://0013-ARM-OMAP-Beagle-clarify-CAM_EN-power.patch \ - file://0014-ARM-OMAP-beagleboard-pre-export-GPIOs-to-userspace-w.patch \ + file://0011-AM37x-Switch-SGX-clocks-to-200MHz.patch \ " SRC_URI_append_beagleboard = " file://logo_linux_clut224.ppm \ -- cgit 1.2.3-korg