From 3f25cb042ca77ac52546ae9f0039cfd0a243698c Mon Sep 17 00:00:00 2001 From: Tony SIM Date: Mon, 8 Nov 2010 04:07:47 +0000 Subject: ARM: mach-shmobile: intc-sh7372: fix interrupt number Signed-off-by: Tony SIM Signed-off-by: Kuninori Morimoto Signed-off-by: Paul Mundt --- arch/arm/mach-shmobile/intc-sh7372.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/mach-shmobile/intc-sh7372.c b/arch/arm/mach-shmobile/intc-sh7372.c index 4cd3cae38e72..30b2f400666a 100644 --- a/arch/arm/mach-shmobile/intc-sh7372.c +++ b/arch/arm/mach-shmobile/intc-sh7372.c @@ -98,7 +98,7 @@ static struct intc_vect intca_vectors[] __initdata = { INTC_VECT(IRQ14A, 0x03c0), INTC_VECT(IRQ15A, 0x03e0), INTC_VECT(IRQ16A, 0x3200), INTC_VECT(IRQ17A, 0x3220), INTC_VECT(IRQ18A, 0x3240), INTC_VECT(IRQ19A, 0x3260), - INTC_VECT(IRQ20A, 0x3280), INTC_VECT(IRQ31A, 0x32a0), + INTC_VECT(IRQ20A, 0x3280), INTC_VECT(IRQ21A, 0x32a0), INTC_VECT(IRQ22A, 0x32c0), INTC_VECT(IRQ23A, 0x32e0), INTC_VECT(IRQ24A, 0x3300), INTC_VECT(IRQ25A, 0x3320), INTC_VECT(IRQ26A, 0x3340), INTC_VECT(IRQ27A, 0x3360), -- cgit v1.2.3-59-g8ed1b From 2e351ec61c35fac01ed1fb1ce35c183bf85e780c Mon Sep 17 00:00:00 2001 From: Yusuke Goda Date: Mon, 8 Nov 2010 05:45:09 +0000 Subject: ARM: mach-shmobile: ap4evb: Mark NOR boot loader partitions read-only. This makes the loader and bootenv partitions read-only under MTD for the on-board NOR flash. Signed-off-by: Yusuke Goda Signed-off-by: Kuninori Morimoto Signed-off-by: Paul Mundt --- arch/arm/mach-shmobile/board-ap4evb.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm/mach-shmobile/board-ap4evb.c b/arch/arm/mach-shmobile/board-ap4evb.c index 32d9e2816e56..63c2fcac8e1e 100644 --- a/arch/arm/mach-shmobile/board-ap4evb.c +++ b/arch/arm/mach-shmobile/board-ap4evb.c @@ -163,11 +163,13 @@ static struct mtd_partition nor_flash_partitions[] = { .name = "loader", .offset = 0x00000000, .size = 512 * 1024, + .mask_flags = MTD_WRITEABLE, }, { .name = "bootenv", .offset = MTDPART_OFS_APPEND, .size = 512 * 1024, + .mask_flags = MTD_WRITEABLE, }, { .name = "kernel_ro", -- cgit v1.2.3-59-g8ed1b From 899be96db75451ba98cb217109ef4cf2ee6de927 Mon Sep 17 00:00:00 2001 From: Axel Lin Date: Mon, 8 Nov 2010 13:35:10 +0800 Subject: rtc: rtc-sh - fix a memory leak request_mem_region() will call kzalloc to allocate memory for struct resource. release_resource() unregisters the resource but does not free the allocated memory, thus use release_mem_region() instead to fix the memory leak. Signed-off-by: Axel Lin Signed-off-by: Paul Mundt --- drivers/rtc/rtc-sh.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/rtc/rtc-sh.c b/drivers/rtc/rtc-sh.c index 5efbd5990ff8..06e41ed93230 100644 --- a/drivers/rtc/rtc-sh.c +++ b/drivers/rtc/rtc-sh.c @@ -761,7 +761,7 @@ err_unmap: clk_put(rtc->clk); iounmap(rtc->regbase); err_badmap: - release_resource(rtc->res); + release_mem_region(rtc->res->start, rtc->regsize); err_badres: kfree(rtc); @@ -786,7 +786,7 @@ static int __exit sh_rtc_remove(struct platform_device *pdev) } iounmap(rtc->regbase); - release_resource(rtc->res); + release_mem_region(rtc->res->start, rtc->regsize); clk_disable(rtc->clk); clk_put(rtc->clk); -- cgit v1.2.3-59-g8ed1b From 99870bd784ff9eb2405eab060125c0ded74968cd Mon Sep 17 00:00:00 2001 From: Paul Mundt Date: Mon, 8 Nov 2010 17:02:26 +0900 Subject: sh: intc: Fix up initializers for gcc 4.5. The _INTC_ARRAY() initializer presently does a NULL test which blows up as a non-constant initializer under gcc 4.5. This switches over to a type test to account for NULL initializers explicitly. Signed-off-by: Paul Mundt --- include/linux/sh_intc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/sh_intc.h b/include/linux/sh_intc.h index f656d1a43dc0..5812fefbcedf 100644 --- a/include/linux/sh_intc.h +++ b/include/linux/sh_intc.h @@ -79,7 +79,7 @@ struct intc_hw_desc { unsigned int nr_subgroups; }; -#define _INTC_ARRAY(a) a, a == NULL ? 0 : sizeof(a)/sizeof(*a) +#define _INTC_ARRAY(a) a, __same_type(a, NULL) ? 0 : sizeof(a)/sizeof(*a) #define INTC_HW_DESC(vectors, groups, mask_regs, \ prio_regs, sense_regs, ack_regs) \ -- cgit v1.2.3-59-g8ed1b From ed10b490ea6498f76284043565d42ca3649ccca1 Mon Sep 17 00:00:00 2001 From: Paul Mundt Date: Wed, 10 Nov 2010 18:02:25 +0900 Subject: sh: clkfwk: fix up compiler warnings. CC drivers/sh/clk/core.o drivers/sh/clk/core.c: In function 'clk_round_parent': drivers/sh/clk/core.c:574: warning: format '%lu' expects type 'long unsigned int', but argument 2 has type 'unsigned int' drivers/sh/clk/core.c:594: warning: format '%lu' expects type 'long unsigned int', but argument 2 has type 'unsigned int' Signed-off-by: Paul Mundt --- drivers/sh/clk/core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/sh/clk/core.c b/drivers/sh/clk/core.c index 09615b51d591..cb12a8e1466b 100644 --- a/drivers/sh/clk/core.c +++ b/drivers/sh/clk/core.c @@ -571,7 +571,7 @@ long clk_round_parent(struct clk *clk, unsigned long target, *best_freq = freq_max; } - pr_debug("too low freq %lu, error %lu\n", freq->frequency, + pr_debug("too low freq %u, error %lu\n", freq->frequency, target - freq_max); if (!error) @@ -591,7 +591,7 @@ long clk_round_parent(struct clk *clk, unsigned long target, *best_freq = freq_min; } - pr_debug("too high freq %lu, error %lu\n", freq->frequency, + pr_debug("too high freq %u, error %lu\n", freq->frequency, freq_min - target); if (!error) -- cgit v1.2.3-59-g8ed1b From bea278278f0bb9af3ce6234acece9772d401a252 Mon Sep 17 00:00:00 2001 From: Paul Mundt Date: Wed, 10 Nov 2010 18:07:43 +0900 Subject: MAINTAINERS: update the sh git tree entry. Reflect the recent tree restructuring. Signed-off-by: Paul Mundt --- MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MAINTAINERS b/MAINTAINERS index 0094224ca79b..39267ace999f 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -5705,7 +5705,7 @@ M: Paul Mundt L: linux-sh@vger.kernel.org W: http://www.linux-sh.org Q: http://patchwork.kernel.org/project/linux-sh/list/ -T: git git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6.git +T: git git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6.git sh-latest S: Supported F: Documentation/sh/ F: arch/sh/ -- cgit v1.2.3-59-g8ed1b From d22c0e5088912a9f05760c597e34876f58d1cee6 Mon Sep 17 00:00:00 2001 From: Paul Mundt Date: Wed, 10 Nov 2010 18:09:14 +0900 Subject: MAINTAINERS: update the ARM SH-Mobile git tree entry. Reflect the recent tree restructuring. Signed-off-by: Paul Mundt --- MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MAINTAINERS b/MAINTAINERS index 0094224ca79b..f5ec964865c7 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -945,7 +945,7 @@ M: Magnus Damm L: linux-sh@vger.kernel.org W: http://oss.renesas.com Q: http://patchwork.kernel.org/project/linux-sh/list/ -T: git git://git.kernel.org/pub/scm/linux/kernel/git/lethal/genesis-2.6.git +T: git git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6.git rmobile-latest S: Supported F: arch/arm/mach-shmobile/ F: drivers/sh/ -- cgit v1.2.3-59-g8ed1b From 6318af900ca7cb2c94b27d3c358762e6ac187e25 Mon Sep 17 00:00:00 2001 From: Paul Mundt Date: Mon, 15 Nov 2010 14:30:30 +0900 Subject: sh: intc: Fix up build failure introduced by radix tree changes. The radix tree retry logic got a bit of an overhaul and subsequently broke the virtual IRQ subgroup build. Simply switch over to radix_tree_deref_retry() as per the filemap changes, which the virq lookup logic was modelled after in the first place. Signed-off-by: Paul Mundt --- drivers/sh/intc/virq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/sh/intc/virq.c b/drivers/sh/intc/virq.c index e5bf5d3c698e..4e0ff7181164 100644 --- a/drivers/sh/intc/virq.c +++ b/drivers/sh/intc/virq.c @@ -215,7 +215,7 @@ restart: entry = radix_tree_deref_slot((void **)entries[i]); if (unlikely(!entry)) continue; - if (unlikely(entry == RADIX_TREE_RETRY)) + if (radix_tree_deref_retry(entry)) goto restart; irq = create_irq(); -- cgit v1.2.3-59-g8ed1b From 574490e30a2a07cd7bc7ee7f63f1e61375a0359b Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 15 Nov 2010 03:11:09 +0000 Subject: ARM: mach-shmobile: ap4evb: add fsib 44100Hz rate Tested-by: Tony SIM Tested-by: TAKEI Mitsuharu Signed-off-by: Kuninori Morimoto Signed-off-by: Paul Mundt --- arch/arm/mach-shmobile/board-ap4evb.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/arm/mach-shmobile/board-ap4evb.c b/arch/arm/mach-shmobile/board-ap4evb.c index 63c2fcac8e1e..d3260542b943 100644 --- a/arch/arm/mach-shmobile/board-ap4evb.c +++ b/arch/arm/mach-shmobile/board-ap4evb.c @@ -583,6 +583,10 @@ static int fsi_set_rate(int is_porta, int rate) return -EINVAL; switch (rate) { + case 44100: + clk_set_rate(fsib_clk, clk_round_rate(fsib_clk, 11283000)); + ret = SH_FSI_ACKMD_256 | SH_FSI_BPFMD_64; + break; case 48000: clk_set_rate(fsib_clk, clk_round_rate(fsib_clk, 85428000)); clk_set_rate(fdiv_clk, clk_round_rate(fdiv_clk, 12204000)); -- cgit v1.2.3-59-g8ed1b