* [PATCH] sh: kfr2r09 board support - NAND flash
@ 2009-08-06 14:58 ` Magnus Damm
[not found] ` <20090806145130.4409.69037.sendpatchset@rx1.opensource.se>
0 siblings, 1 reply; 2+ messages in thread
From: Magnus Damm @ 2009-08-06 14:58 UTC (permalink / raw)
To: linux-sh; +Cc: tony, Magnus Damm, kyungmin.park, lethal, linux-mtd, akpm, dwmw2
From: Magnus Damm <damm@igel.co.jp>
This patch adds support for the NAND flash chip
attached to CS4 on the KFR2R09 board. The device is
driven by the platform device driver "onenand-flash".
Signed-off-by: Magnus Damm <damm@igel.co.jp>
---
No merge/build time dependencies, but needs the following patch
to start working on the actual hardware:
"[PATCH] mtd: make onenand/generic.c more generic"
arch/sh/boards/mach-kfr2r09/setup.c | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)
--- 0003/arch/sh/boards/mach-kfr2r09/setup.c
+++ work/arch/sh/boards/mach-kfr2r09/setup.c 2009-08-06 21:37:18.000000000 +0900
@@ -11,6 +11,7 @@
#include <linux/platform_device.h>
#include <linux/interrupt.h>
#include <linux/mtd/physmap.h>
+#include <linux/mtd/onenand.h>
#include <linux/delay.h>
#include <linux/clk.h>
#include <linux/gpio.h>
@@ -62,6 +63,21 @@ static struct platform_device kfr2r09_no
},
};
+static struct resource kfr2r09_nand_flash_resources[] = {
+ [0] = {
+ .name = "NAND Flash",
+ .start = 0x10000000,
+ .end = 0x1001ffff,
+ .flags = IORESOURCE_MEM,
+ }
+};
+
+static struct platform_device kfr2r09_nand_flash_device = {
+ .name = "onenand-flash",
+ .resource = kfr2r09_nand_flash_resources,
+ .num_resources = ARRAY_SIZE(kfr2r09_nand_flash_resources),
+};
+
static struct sh_keysc_info kfr2r09_sh_keysc_info = {
.mode = SH_KEYSC_MODE_1, /* KEYOUT0->4, KEYIN0->4 */
.scan_timing = 3,
@@ -161,12 +177,15 @@ static struct platform_device kfr2r09_sh
static struct platform_device *kfr2r09_devices[] __initdata = {
&kfr2r09_nor_flash_device,
+ &kfr2r09_nand_flash_device,
&kfr2r09_sh_keysc_device,
&kfr2r09_sh_lcdc_device,
};
#define BSC_CS0BCR 0xfec10004
#define BSC_CS0WCR 0xfec10024
+#define BSC_CS4BCR 0xfec10010
+#define BSC_CS4WCR 0xfec10030
static int __init kfr2r09_devices_setup(void)
{
@@ -178,6 +197,10 @@ static int __init kfr2r09_devices_setup(
ctrl_outl(0x36db0400, BSC_CS0BCR);
ctrl_outl(0x00000500, BSC_CS0WCR);
+ /* setup NAND flash at CS4 */
+ ctrl_outl(0x36db0400, BSC_CS4BCR);
+ ctrl_outl(0x00000500, BSC_CS4WCR);
+
/* setup KEYSC pins */
gpio_request(GPIO_FN_KEYOUT0, NULL);
gpio_request(GPIO_FN_KEYOUT1, NULL);
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] sh: LCDC SYS bus access wait fix
[not found] ` <20090806142812.3947.24083.sendpatchset@rx1.opensource.se>
@ 2009-08-13 3:03 ` Paul Mundt
0 siblings, 0 replies; 2+ messages in thread
From: Paul Mundt @ 2009-08-13 3:03 UTC (permalink / raw)
To: Magnus Damm; +Cc: linux-sh, tony, kyungmin.park, linux-mtd, akpm, dwmw2
On Thu, Aug 06, 2009 at 11:28:12PM +0900, Magnus Damm wrote:
> Update the SuperH Mobile LCDC driver to wait for SYS bus to
> become idle after reading or writing. This is needed by the
> kfr2r09 board, but also fixes potential problems on other
> boards making use of the LCDC in a SYS configuration.
On Thu, Aug 06, 2009 at 11:34:38PM +0900, Magnus Damm wrote:
> Fix the SuperH Mobile LCDC driver to make use of the full
> 18-bit DRD field in the LDDRDR register. Without this patch
> only 16-bit register access is possible. Needed by 18-bit
> SYS panels such as the one used on kfr2r09.
On Thu, Aug 06, 2009 at 11:51:30PM +0900, Magnus Damm wrote:
> This patch adds support for the WQVGA LCD display used by
> the KFR2R09 board. The LCD module is a TX07D34VM0AAA made
> by Hitachi, and this module is made up by a R61517 chip
> together with a 240x400 pixel display. The screen is
> attached to the SuperH Mobile LCDC using a 18-bit SYS bus.
>
> The register settings used by the SYS panel setup code are
> based on an out-of-tree driver which apart from duplicating
> all LCDC driver code and writing to non-existing hardware
> registers also never was posted for upstream merge.
On Thu, Aug 06, 2009 at 11:58:43PM +0900, Magnus Damm wrote:
> This patch adds support for the NAND flash chip
> attached to CS4 on the KFR2R09 board. The device is
> driven by the platform device driver "onenand-flash".
On Fri, Aug 07, 2009 at 12:03:43AM +0900, Magnus Damm wrote:
> This patch adds support for LED9, LED10 and LED11 on
> the Solution Engine 7724 board. If CONFIG_PM is enabled
> then these LEDs are used to show the hardware sleep
> mode used by the processor. Useful to debug cpuidle.
On Fri, Aug 07, 2009 at 12:12:27AM +0900, Magnus Damm wrote:
> This patch moves all the romImage related header files into
> the mach/ directory.
On Fri, Aug 07, 2009 at 12:16:29AM +0900, Magnus Damm wrote:
> This patch moves the Migo-R specific header file from
> mach-common/ into mach-migor/ and removes unused cruft.
All applied, thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-08-13 3:03 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20090806151629.5142.26006.sendpatchset@rx1.opensource.se>
[not found] ` <20090806151227.5103.31166.sendpatchset@rx1.opensource.se>
[not found] ` <20090806150343.4770.1714.sendpatchset@rx1.opensource.se>
2009-08-06 14:58 ` [PATCH] sh: kfr2r09 board support - NAND flash Magnus Damm
[not found] ` <20090806145130.4409.69037.sendpatchset@rx1.opensource.se>
[not found] ` <20090806143438.4005.17251.sendpatchset@rx1.opensource.se>
[not found] ` <20090806142812.3947.24083.sendpatchset@rx1.opensource.se>
2009-08-13 3:03 ` [PATCH] sh: LCDC SYS bus access wait fix Paul Mundt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).