From 3ce1feb8ad6d7e274c437f91441bdf1b9cca46e3 Mon Sep 17 00:00:00 2001 From: Andrea Adami Date: Wed, 20 Nov 2013 23:27:14 +0100 Subject: linux-yocto-dev: collie: sync patches for 3.12 with linux-yocto Signed-off-by: Andrea Adami --- .../linux/linux-yocto-dev/collie/collie.scc | 12 +++ .../patches-locomo/locomo-fix-SCL-SDA.patch | 28 ++++++ .../patches-locomo/locomolcd-suspend-resume.patch | 92 +++++++++++++++++ .../patches-mtd/collie-cfi-probe-again.patch | 29 ++++++ .../patches-mtd/collie-fixup-strataflash.patch | 27 +++++ .../patches/patches-mtd/collie-force-cfi.patch | 30 ++++++ .../patches/patches-mtd/collie-force-unlock.patch | 22 ++++ .../patches/patches-mtd/collie-mtd-resize.patch | 41 ++++++++ .../patches-sa1100/arm-sa1100-add-cpu-clock.patch | 95 +++++++++++++++++ .../patches-sa1100/collie-add-bootblock.patch | 29 ++++++ .../patches/patches-sa1100/collie-irda.patch | 88 ++++++++++++++++ .../fbdev-sa1100fb-make-use-of-device-clock.patch | 112 +++++++++++++++++++++ .../pcmcia-sa1100-device-clock.patch | 100 ++++++++++++++++++ 13 files changed, 705 insertions(+) create mode 100644 recipes-kernel/linux/linux-yocto-dev/patches/patches-locomo/locomo-fix-SCL-SDA.patch create mode 100644 recipes-kernel/linux/linux-yocto-dev/patches/patches-locomo/locomolcd-suspend-resume.patch create mode 100644 recipes-kernel/linux/linux-yocto-dev/patches/patches-mtd/collie-cfi-probe-again.patch create mode 100644 recipes-kernel/linux/linux-yocto-dev/patches/patches-mtd/collie-fixup-strataflash.patch create mode 100644 recipes-kernel/linux/linux-yocto-dev/patches/patches-mtd/collie-force-cfi.patch create mode 100644 recipes-kernel/linux/linux-yocto-dev/patches/patches-mtd/collie-force-unlock.patch create mode 100644 recipes-kernel/linux/linux-yocto-dev/patches/patches-mtd/collie-mtd-resize.patch create mode 100644 recipes-kernel/linux/linux-yocto-dev/patches/patches-sa1100/arm-sa1100-add-cpu-clock.patch create mode 100644 recipes-kernel/linux/linux-yocto-dev/patches/patches-sa1100/collie-add-bootblock.patch create mode 100644 recipes-kernel/linux/linux-yocto-dev/patches/patches-sa1100/collie-irda.patch create mode 100644 recipes-kernel/linux/linux-yocto-dev/patches/patches-sa1100/fbdev-sa1100fb-make-use-of-device-clock.patch create mode 100644 recipes-kernel/linux/linux-yocto-dev/patches/patches-sa1100/pcmcia-sa1100-device-clock.patch (limited to 'recipes-kernel') diff --git a/recipes-kernel/linux/linux-yocto-dev/collie/collie.scc b/recipes-kernel/linux/linux-yocto-dev/collie/collie.scc index 7cf0e9d..15986bf 100644 --- a/recipes-kernel/linux/linux-yocto-dev/collie/collie.scc +++ b/recipes-kernel/linux/linux-yocto-dev/collie/collie.scc @@ -3,3 +3,15 @@ kconf hardware collie.cfg include ../zaurus-common.scc patch ../patches/patches-locomokbd/locomo_kbd_tweak-r2.patch +patch ../patches/patches-mtd/collie-cfi-probe-again.patch +patch ../patches/patches-mtd/collie-force-cfi.patch +patch ../patches/patches-mtd/collie-mtd-resize.patch +patch ../patches/patches-mtd/collie-force-unlock.patch +patch ../patches/patches-mtd/collie-fixup-strataflash.patch +patch ../patches/patches-sa1100/collie-irda.patch +patch ../patches/patches-sa1100/collie-add-bootblock.patch +patch ../patches/patches-sa1100/arm-sa1100-add-cpu-clock.patch +patch ../patches/patches-sa1100/fbdev-sa1100fb-make-use-of-device-clock.patch +patch ../patches/patches-sa1100/pcmcia-sa1100-device-clock.patch +patch ../patches/patches-locomo/locomo-fix-SCL-SDA.patch +patch ../patches/patches-locomo/locomolcd-suspend-resume.patch diff --git a/recipes-kernel/linux/linux-yocto-dev/patches/patches-locomo/locomo-fix-SCL-SDA.patch b/recipes-kernel/linux/linux-yocto-dev/patches/patches-locomo/locomo-fix-SCL-SDA.patch new file mode 100644 index 0000000..fbf3edd --- /dev/null +++ b/recipes-kernel/linux/linux-yocto-dev/patches/patches-locomo/locomo-fix-SCL-SDA.patch @@ -0,0 +1,28 @@ +From acc2f94781ab11bead994bb3faaad149f9187bd4 Mon Sep 17 00:00:00 2001 +From: Andrea Adami +Date: Tue, 12 Nov 2013 22:21:20 +0100 +Subject: [PATCH] linux-yocto: collie: locomo.c: fix SCL line instead + of SDA + +Signed-off-by: Dmitry Eremin-Solenikov +Signed-off-by: Andrea Adami +--- + arch/arm/common/locomo.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/arch/arm/common/locomo.c b/arch/arm/common/locomo.c +index b55c362..d827bcb 100644 +--- a/arch/arm/common/locomo.c ++++ b/arch/arm/common/locomo.c +@@ -629,7 +629,7 @@ static void locomo_m62332_sendbit(void *mapbase, int bit) + unsigned int r; + + r = locomo_readl(mapbase + LOCOMO_DAC); +- r &= ~(LOCOMO_DAC_SCLOEB); ++ r &= ~(LOCOMO_DAC_SDAOEB); + locomo_writel(r, mapbase + LOCOMO_DAC); + udelay(DAC_LOW_SETUP_TIME); /* 300 nsec */ + udelay(DAC_DATA_HOLD_TIME); /* 300 nsec */ +-- +1.8.1.5 + diff --git a/recipes-kernel/linux/linux-yocto-dev/patches/patches-locomo/locomolcd-suspend-resume.patch b/recipes-kernel/linux/linux-yocto-dev/patches/patches-locomo/locomolcd-suspend-resume.patch new file mode 100644 index 0000000..a3d63e0 --- /dev/null +++ b/recipes-kernel/linux/linux-yocto-dev/patches/patches-locomo/locomolcd-suspend-resume.patch @@ -0,0 +1,92 @@ +From ec4ff55857d5f48d2bf08e46f12eb4670ec6aa1a Mon Sep 17 00:00:00 2001 +From: Dmitry Eremin-Solenikov +Date: Thu, 14 Nov 2013 17:18:26 +0400 +Subject: [PATCH] backlight: locomolcd: fix suspend/resume + +Replace cooked suspend/resume with support from core backlight layer. +This allows us to remove suspend/resume callbacks from locomolcd +completely. They were not working anyway, as locomo does not support +pm_ops handling. + +Signed-off-by: Dmitry Eremin-Solenikov +--- + drivers/video/backlight/locomolcd.c | 26 +++----------------------- + 1 file changed, 3 insertions(+), 23 deletions(-) + +diff --git a/drivers/video/backlight/locomolcd.c b/drivers/video/backlight/locomolcd.c +index 6c3ec42..54d2da9 100644 +--- a/drivers/video/backlight/locomolcd.c ++++ b/drivers/video/backlight/locomolcd.c +@@ -28,8 +28,6 @@ + + static struct backlight_device *locomolcd_bl_device; + static struct locomo_dev *locomolcd_dev; +-static unsigned long locomolcd_flags; +-#define LOCOMOLCD_SUSPENDED 0x01 + + static void locomolcd_on(int comadj) + { +@@ -117,7 +115,7 @@ static int locomolcd_set_intensity(struct backlight_device *bd) + intensity = 0; + if (bd->props.fb_blank != FB_BLANK_UNBLANK) + intensity = 0; +- if (locomolcd_flags & LOCOMOLCD_SUSPENDED) ++ if (bd->props.state & BL_CORE_SUSPENDED) + intensity = 0; + + switch (intensity) { +@@ -155,26 +153,9 @@ static int locomolcd_get_intensity(struct backlight_device *bd) + static const struct backlight_ops locomobl_data = { + .get_brightness = locomolcd_get_intensity, + .update_status = locomolcd_set_intensity, ++ .options = BL_CORE_SUSPENDRESUME, + }; + +-#ifdef CONFIG_PM_SLEEP +-static int locomolcd_suspend(struct device *dev) +-{ +- locomolcd_flags |= LOCOMOLCD_SUSPENDED; +- locomolcd_set_intensity(locomolcd_bl_device); +- return 0; +-} +- +-static int locomolcd_resume(struct device *dev) +-{ +- locomolcd_flags &= ~LOCOMOLCD_SUSPENDED; +- locomolcd_set_intensity(locomolcd_bl_device); +- return 0; +-} +-#endif +- +-static SIMPLE_DEV_PM_OPS(locomolcd_pm_ops, locomolcd_suspend, locomolcd_resume); +- + static int locomolcd_probe(struct locomo_dev *ldev) + { + struct backlight_properties props; +@@ -198,6 +179,7 @@ static int locomolcd_probe(struct locomo_dev *ldev) + memset(&props, 0, sizeof(struct backlight_properties)); + props.type = BACKLIGHT_RAW; + props.max_brightness = 4; ++ props.brightness = 2; + locomolcd_bl_device = backlight_device_register("locomo-bl", + &ldev->dev, NULL, + &locomobl_data, &props); +@@ -206,7 +188,6 @@ static int locomolcd_probe(struct locomo_dev *ldev) + return PTR_ERR(locomolcd_bl_device); + + /* Set up frontlight so that screen is readable */ +- locomolcd_bl_device->props.brightness = 2; + locomolcd_set_intensity(locomolcd_bl_device); + + return 0; +@@ -230,7 +211,6 @@ static int locomolcd_remove(struct locomo_dev *dev) + static struct locomo_driver poodle_lcd_driver = { + .drv = { + .name = "locomo-backlight", +- .pm = &locomolcd_pm_ops, + }, + .devid = LOCOMO_DEVID_BACKLIGHT, + .probe = locomolcd_probe, +-- +1.8.4.2 + diff --git a/recipes-kernel/linux/linux-yocto-dev/patches/patches-mtd/collie-cfi-probe-again.patch b/recipes-kernel/linux/linux-yocto-dev/patches/patches-mtd/collie-cfi-probe-again.patch new file mode 100644 index 0000000..3054106 --- /dev/null +++ b/recipes-kernel/linux/linux-yocto-dev/patches/patches-mtd/collie-cfi-probe-again.patch @@ -0,0 +1,29 @@ +From 35957eda21bdd2f22c84fa269c1b856f5039c308 Mon Sep 17 00:00:00 2001 +From: Andrea Adami +Date: Tue, 12 Nov 2013 22:32:26 +0100 +Subject: [PATCH] sa1100: collie: detect NOR again with cfi_probe + +Ehile the detection is still forced we switch away from jedec: +the CFI code allows us to set the necessary fixups. + +Signed-off-by: Andrea Adami +--- + arch/arm/mach-sa1100/collie.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/arch/arm/mach-sa1100/collie.c b/arch/arm/mach-sa1100/collie.c +index 799902d..8c088cc 100644 +--- a/arch/arm/mach-sa1100/collie.c ++++ b/arch/arm/mach-sa1100/collie.c +@@ -326,7 +326,7 @@ static void collie_flash_exit(void) + } + + static struct flash_platform_data collie_flash_data = { +- .map_name = "jedec_probe", ++ .map_name = "cfi_probe", + .init = collie_flash_init, + .set_vpp = collie_set_vpp, + .exit = collie_flash_exit, +-- +1.8.1.5 + diff --git a/recipes-kernel/linux/linux-yocto-dev/patches/patches-mtd/collie-fixup-strataflash.patch b/recipes-kernel/linux/linux-yocto-dev/patches/patches-mtd/collie-fixup-strataflash.patch new file mode 100644 index 0000000..1fef596 --- /dev/null +++ b/recipes-kernel/linux/linux-yocto-dev/patches/patches-mtd/collie-fixup-strataflash.patch @@ -0,0 +1,27 @@ +From 64fab473fe31b5c8a76000d7e82df7f6cdd751ba Mon Sep 17 00:00:00 2001 +From: Andrea Adami +Date: Tue, 12 Nov 2013 01:28:18 +0100 +Subject: [PATCH 627/627] linux-yocto: collie: add MTD fixup like for Intel + Strataflash + +Signed-off-by: Andrea Adami +--- + drivers/mtd/chips/cfi_cmdset_0001.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/drivers/mtd/chips/cfi_cmdset_0001.c b/drivers/mtd/chips/cfi_cmdset_0001.c +index d9d6f0e..eedb60b 100644 +--- a/drivers/mtd/chips/cfi_cmdset_0001.c ++++ b/drivers/mtd/chips/cfi_cmdset_0001.c +@@ -36,7 +36,7 @@ + #include + #include + +-/* #define CMDSET0001_DISABLE_ERASE_SUSPEND_ON_WRITE */ ++#define CMDSET0001_DISABLE_ERASE_SUSPEND_ON_WRITE + /* #define CMDSET0001_DISABLE_WRITE_SUSPEND */ + + // debugging, turns off buffer write mode if set to 1 +-- +1.8.1.5 + diff --git a/recipes-kernel/linux/linux-yocto-dev/patches/patches-mtd/collie-force-cfi.patch b/recipes-kernel/linux/linux-yocto-dev/patches/patches-mtd/collie-force-cfi.patch new file mode 100644 index 0000000..958fce7 --- /dev/null +++ b/recipes-kernel/linux/linux-yocto-dev/patches/patches-mtd/collie-force-cfi.patch @@ -0,0 +1,30 @@ +From c39115ed52359eb5f0475ea2b4a2e71acb5da54b Mon Sep 17 00:00:00 2001 +From: Andrea Adami +Date: Thu, 7 Nov 2013 23:17:36 +0100 +Subject: [PATCH] cfi_util.c: force CFI detection even if Q R Y test + fails + +Signed-off-by: Andrea Adami +--- + drivers/mtd/chips/cfi_util.c | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/drivers/mtd/chips/cfi_util.c b/drivers/mtd/chips/cfi_util.c +index f992418..bdee7b9 100644 +--- a/drivers/mtd/chips/cfi_util.c ++++ b/drivers/mtd/chips/cfi_util.c +@@ -85,7 +85,10 @@ int __xipram cfi_qry_mode_on(uint32_t base, struct map_info *map, + if (cfi_qry_present(map, base, cfi)) + return 1; + /* QRY not found */ +- return 0; ++/* return 0; */ ++ ++/* FIXME: UGLY HACK: FORCE DETECTION */ ++ return 1; + } + EXPORT_SYMBOL_GPL(cfi_qry_mode_on); + +-- +1.8.1.5 + diff --git a/recipes-kernel/linux/linux-yocto-dev/patches/patches-mtd/collie-force-unlock.patch b/recipes-kernel/linux/linux-yocto-dev/patches/patches-mtd/collie-force-unlock.patch new file mode 100644 index 0000000..d599d1d --- /dev/null +++ b/recipes-kernel/linux/linux-yocto-dev/patches/patches-mtd/collie-force-unlock.patch @@ -0,0 +1,22 @@ +From c39115ed52359eb5f0475ea2b4a2e71acb5da54b Mon Sep 17 00:00:00 2001 +From: Andrea Adami +Date: Thu, 7 Nov 2013 23:17:36 +0100 +Subject: [PATCH] collie: force flash unlock on boot + +Signed-off-by: Andrea Adami +--- + drivers/mtd/chips/cfi_cmdset_0001.c | 1 + + 1 file changed, 1 insertions(+), 0 deletion(-) + +diff --git a/drivers/mtd/chips/cfi_cmdset_0001.c b/drivers/mtd/chips/cfi_cmdset_0001.c +index 7751443..d9d6f0e 100644 +--- a/drivers/mtd/chips/cfi_cmdset_0001.c ++++ b/drivers/mtd/chips/cfi_cmdset_0001.c +@@ -310,6 +310,7 @@ static struct cfi_fixup cfi_fixup_table[] = { + { CFI_MFR_ST, 0x00ba, /* M28W320CT */ fixup_st_m28w320ct }, + { CFI_MFR_ST, 0x00bb, /* M28W320CB */ fixup_st_m28w320cb }, + { CFI_MFR_INTEL, CFI_ID_ANY, fixup_unlock_powerup_lock }, ++ { CFI_MFR_SHARP, 0x00b0, fixup_unlock_powerup_lock }, + { 0, 0, NULL } + }; + diff --git a/recipes-kernel/linux/linux-yocto-dev/patches/patches-mtd/collie-mtd-resize.patch b/recipes-kernel/linux/linux-yocto-dev/patches/patches-mtd/collie-mtd-resize.patch new file mode 100644 index 0000000..ba52d2f --- /dev/null +++ b/recipes-kernel/linux/linux-yocto-dev/patches/patches-mtd/collie-mtd-resize.patch @@ -0,0 +1,41 @@ +From 85f5a57b9bdd94fa7a20280c31f4f8b148368215 Mon Sep 17 00:00:00 2001 +From: Andrea Adami +Date: Thu, 7 Nov 2013 23:00:31 +0100 +Subject: ARM: SA1100: resize collie mtd to SZ_16M + +The end-user models have all 2x8 = 16 Megabytes of NOR. +It seems that only some dev models/prototype had 32M. +With current code, giving size of 32M can confuse the detection. + +JEDEC: +sa1100-0: Found 2 x16 devices at 0x0 in 32-bit bank +sa1100-0: Found different chip or no chip at all (mfr 0x4, id 0x3001) at 0x1000000 +SA1100 flash: CFI device at 0x00000000, 16MiB, 32-bit + +CFI: +sa1100-0: Found 2 x16 devices at 0x0 in 32-bit bank. Manufacturer ID 0x0000b0 Chip ID 0x0000b0 +sa1100-0: Found 2 x16 devices at 0x1000000 in 32-bit bank +Intel/Sharp Extended Query Table at 0x0039 +... +sa1100-0: 2 set(s) of 2 interleaved chips --> 2 partitions of 16384 KiB +SA1100 flash: CFI device at 0x00000000, 32MiB, 32-bit + + +Signed-off-by: Andrea Adami +--- + arch/arm/mach-sa1100/collie.c | 2 +- + 2 files changed, 230404 insertions(+), 1604 deletions(-) + +diff --git a/arch/arm/mach-sa1100/collie.c b/arch/arm/mach-sa1100/collie.c +index 7fb96eb..c1005ef 100644 +--- a/arch/arm/mach-sa1100/collie.c ++++ b/arch/arm/mach-sa1100/collie.c +@@ -298,7 +298,7 @@ static struct flash_platform_data collie_flash_data = { + }; + + static struct resource collie_flash_resources[] = { +- DEFINE_RES_MEM(SA1100_CS0_PHYS, SZ_32M), ++ DEFINE_RES_MEM(SA1100_CS0_PHYS, SZ_16M), + }; + + static struct sa1100fb_mach_info collie_lcd_info = { diff --git a/recipes-kernel/linux/linux-yocto-dev/patches/patches-sa1100/arm-sa1100-add-cpu-clock.patch b/recipes-kernel/linux/linux-yocto-dev/patches/patches-sa1100/arm-sa1100-add-cpu-clock.patch new file mode 100644 index 0000000..cf3e23b --- /dev/null +++ b/recipes-kernel/linux/linux-yocto-dev/patches/patches-sa1100/arm-sa1100-add-cpu-clock.patch @@ -0,0 +1,95 @@ +From 6abd8c6c642b7f5da4a8065fa6b29c4c90df308d Mon Sep 17 00:00:00 2001 +From: Dmitry Eremin-Solenikov +Date: Mon, 11 Nov 2013 22:53:36 +0400 +Subject: [PATCH 1/2] arm: sa1100: add cpu clock + +Both SA1100 framebuffer and PCMCIA drivers require knowledge of cpu +frequency to correctly program timings. Currently they receive timing +information by calling cpufreq_get(0). However if cpu frequency driver +is not enabled (e.g. due to unsupported DRAM chip/board on sa1110) +cpufreq_get(0) returns 0, causing incorrect timings to be programmed. + +Add cpu clock returning cpu frequency, to be used by sa11x0 fb and +pcmcia drivers. + +Signed-off-by: Dmitry Eremin-Solenikov +--- + arch/arm/mach-sa1100/clock.c | 34 ++++++++++++++++++++++++++++++++++ + 1 file changed, 34 insertions(+) + +diff --git a/arch/arm/mach-sa1100/clock.c b/arch/arm/mach-sa1100/clock.c +index 172ebd0..abf1dc1 100644 +--- a/arch/arm/mach-sa1100/clock.c ++++ b/arch/arm/mach-sa1100/clock.c +@@ -15,10 +15,12 @@ + #include + + #include ++#include + + struct clkops { + void (*enable)(struct clk *); + void (*disable)(struct clk *); ++ unsigned long (*get_rate)(struct clk *); + }; + + struct clk { +@@ -51,6 +53,19 @@ static void clk_gpio27_disable(struct clk *clk) + GAFR &= ~GPIO_32_768kHz; + } + ++static void clk_cpu_enable(struct clk *clk) ++{ ++} ++ ++static void clk_cpu_disable(struct clk *clk) ++{ ++} ++ ++static unsigned long clk_cpu_get_rate(struct clk *clk) ++{ ++ return sa11x0_getspeed(0) * 1000; ++} ++ + int clk_enable(struct clk *clk) + { + unsigned long flags; +@@ -80,16 +95,35 @@ void clk_disable(struct clk *clk) + } + EXPORT_SYMBOL(clk_disable); + ++unsigned long clk_get_rate(struct clk *clk) ++{ ++ if (clk && clk->ops && clk->ops->get_rate) ++ return clk->ops->get_rate(clk); ++ else ++ return 0; ++} ++EXPORT_SYMBOL(clk_get_rate); ++ + const struct clkops clk_gpio27_ops = { + .enable = clk_gpio27_enable, + .disable = clk_gpio27_disable, + }; + ++const struct clkops clk_cpu_ops = { ++ .enable = clk_cpu_enable, ++ .disable = clk_cpu_disable, ++ .get_rate = clk_cpu_get_rate, ++}; ++ + static DEFINE_CLK(gpio27, &clk_gpio27_ops); + ++static DEFINE_CLK(cpu, &clk_cpu_ops); ++ + static struct clk_lookup sa11xx_clkregs[] = { + CLKDEV_INIT("sa1111.0", NULL, &clk_gpio27), + CLKDEV_INIT("sa1100-rtc", NULL, NULL), ++ CLKDEV_INIT("sa11x0-fb", NULL, &clk_cpu), ++ CLKDEV_INIT("sa11x0-pcmcia", NULL, &clk_cpu), + }; + + static int __init sa11xx_clk_init(void) +-- +1.8.4.2 + diff --git a/recipes-kernel/linux/linux-yocto-dev/patches/patches-sa1100/collie-add-bootblock.patch b/recipes-kernel/linux/linux-yocto-dev/patches/patches-sa1100/collie-add-bootblock.patch new file mode 100644 index 0000000..9f5aaa7 --- /dev/null +++ b/recipes-kernel/linux/linux-yocto-dev/patches/patches-sa1100/collie-add-bootblock.patch @@ -0,0 +1,29 @@ +From 0b6559d7a3e28c89c3093fd193076a5d7d7c699b Mon Sep 17 00:00:00 2001 +From: Andrea Adami +Date: Sat, 9 Nov 2013 16:30:01 +0100 +Subject: [PATCH] linux-yocto: collie: add top boot partition + +Signed-off-by: Andrea Adami +--- + arch/arm/mach-sa1100/collie.c | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/arch/arm/mach-sa1100/collie.c b/arch/arm/mach-sa1100/collie.c +index 946fa71..2785e6e 100644 +--- a/arch/arm/mach-sa1100/collie.c ++++ b/arch/arm/mach-sa1100/collie.c +@@ -294,6 +294,11 @@ static struct mtd_partition collie_partitions[] = { + .name = "rootfs", + .offset = MTDPART_OFS_APPEND, + .size = 0x00e20000, ++ }, { ++ .name = "bootblock", ++ .offset = MTDPART_OFS_APPEND, ++ .size = 0x00020000, ++ .mask_flags = MTD_WRITEABLE + } + }; + +-- +1.8.1.5 + diff --git a/recipes-kernel/linux/linux-yocto-dev/patches/patches-sa1100/collie-irda.patch b/recipes-kernel/linux/linux-yocto-dev/patches/patches-sa1100/collie-irda.patch new file mode 100644 index 0000000..46ad808 --- /dev/null +++ b/recipes-kernel/linux/linux-yocto-dev/patches/patches-sa1100/collie-irda.patch @@ -0,0 +1,88 @@ +From c6fb61edf283f255c3763a57366bb89bb36ad79c Mon Sep 17 00:00:00 2001 +From: Dmitry Eremin-Solenikov +Date: Fri, 8 Nov 2013 17:57:32 +0400 +Subject: [PATCH] collie: add support for IrDA transceiver + +Collie has onboard IrDA transceiver controlled via active-low gpio. Add +corresponding platform data. + +Signed-off-by: Dmitry Eremin-Solenikov +--- + arch/arm/mach-sa1100/collie.c | 33 ++++++++++++++++++++++++++++++ + arch/arm/mach-sa1100/include/mach/collie.h | 2 +- + 2 files changed, 34 insertions(+), 1 deletion(-) + +diff --git a/arch/arm/mach-sa1100/collie.c b/arch/arm/mach-sa1100/collie.c +index 2349dee..1b9473d 100644 +--- a/arch/arm/mach-sa1100/collie.c ++++ b/arch/arm/mach-sa1100/collie.c +@@ -41,6 +41,7 @@ + #include + #include + #include ++#include + + #include + #include +@@ -94,6 +95,37 @@ static struct mcp_plat_data collie_mcp_data = { + .codec_pdata = &collie_ucb1x00_data, + }; + ++int collie_ir_startup(struct device *dev) ++{ ++ int rc = gpio_request(COLLIE_GPIO_IR_ON, "IrDA"); ++ if (rc) ++ return rc; ++ rc = gpio_direction_output(COLLIE_GPIO_IR_ON, 1); ++ ++ if (!rc) ++ return 0; ++ ++ gpio_free(COLLIE_GPIO_IR_ON); ++ return rc; ++} ++ ++void collie_ir_shutdown(struct device *dev) ++{ ++ gpio_free(COLLIE_GPIO_IR_ON); ++} ++ ++static int collie_ir_set_power(struct device *dev, unsigned int state) ++{ ++ gpio_set_value(COLLIE_GPIO_IR_ON, !state); ++ return 0; ++} ++ ++static struct irda_platform_data collie_ir_data = { ++ .startup = collie_ir_startup, ++ .shutdown = collie_ir_shutdown, ++ .set_power = collie_ir_set_power, ++}; ++ + /* + * Collie AC IN + */ +@@ -323,6 +355,7 @@ static void __init collie_init(void) + sa11x0_register_mtd(&collie_flash_data, collie_flash_resources, + ARRAY_SIZE(collie_flash_resources)); + sa11x0_register_mcp(&collie_mcp_data); ++ sa11x0_register_irda(&collie_ir_data); + + sharpsl_save_param(); + } +diff --git a/arch/arm/mach-sa1100/include/mach/collie.h b/arch/arm/mach-sa1100/include/mach/collie.h +index f33679d..0ef22f9 100644 +--- a/arch/arm/mach-sa1100/include/mach/collie.h ++++ b/arch/arm/mach-sa1100/include/mach/collie.h +@@ -78,7 +78,7 @@ extern void locomolcd_power(int on); + #define COLLIE_TC35143_GPIO_VERSION0 UCB_IO_0 + #define COLLIE_TC35143_GPIO_TBL_CHK UCB_IO_1 + #define COLLIE_TC35143_GPIO_VPEN_ON UCB_IO_2 +-#define COLLIE_TC35143_GPIO_IR_ON UCB_IO_3 ++#define COLLIE_GPIO_IR_ON (COLLIE_TC35143_GPIO_BASE + 3) + #define COLLIE_TC35143_GPIO_AMP_ON UCB_IO_4 + #define COLLIE_TC35143_GPIO_VERSION1 UCB_IO_5 + #define COLLIE_TC35143_GPIO_FS8KLPF UCB_IO_5 +-- +1.8.4.rc3 + diff --git a/recipes-kernel/linux/linux-yocto-dev/patches/patches-sa1100/fbdev-sa1100fb-make-use-of-device-clock.patch b/recipes-kernel/linux/linux-yocto-dev/patches/patches-sa1100/fbdev-sa1100fb-make-use-of-device-clock.patch new file mode 100644 index 0000000..c510ef1 --- /dev/null +++ b/recipes-kernel/linux/linux-yocto-dev/patches/patches-sa1100/fbdev-sa1100fb-make-use-of-device-clock.patch @@ -0,0 +1,112 @@ +From 14edf9123f62bbfbfbffe38e2837b51b3a6065b5 Mon Sep 17 00:00:00 2001 +From: Dmitry Eremin-Solenikov +Date: Mon, 11 Nov 2013 22:58:02 +0400 +Subject: [PATCH 2/2] fbdev: sa1100fb: make use of device clock + +Use per-device clock (instead of calling cpufreq_get(0), which can +return 0 if no cpu frequency driver is selected) to program timings. + +Signed-off-by: Dmitry Eremin-Solenikov +--- +drivers/video/sa1100fb.c | 24 +++++++++++++++++------- + drivers/video/sa1100fb.h | 1 + + 2 files changed, 18 insertions(+), 7 deletions(-) + +diff --git a/drivers/video/sa1100fb.c b/drivers/video/sa1100fb.c +index de76da0..05d1b37 100644 +--- a/drivers/video/sa1100fb.c ++++ b/drivers/video/sa1100fb.c +@@ -178,6 +178,7 @@ + #include + #include + #include ++#include + + #include