From: Felipe Balbi <me@felipebalbi.com>
To: Grazvydas Ignotas <notasas@gmail.com>
Cc: linux-omap@vger.kernel.org
Subject: Re: [PATCH] omap: Add basic support for Pandora handheld console
Date: Sat, 18 Oct 2008 22:55:29 +0300 [thread overview]
Message-ID: <20081018195518.GQ31842@frodo> (raw)
In-Reply-To: <1224357743-23060-1-git-send-email-notasas@gmail.com>
On Sat, Oct 18, 2008 at 10:22:23PM +0300, Grazvydas Ignotas wrote:
> +static struct mtd_partition omap3pandora_nand_partitions[] = {
> + {
> + .name = "xloader",
> + .offset = 0, /* Offset = 0x00000 */
> + .size = 4 * NAND_BLOCK_SIZE,
> + .mask_flags = MTD_WRITEABLE
> + },
> + {
}, { looks better
> + .name = "uboot",
> + .offset = MTDPART_OFS_APPEND, /* Offset = 0x80000 */
> + .size = 14 * NAND_BLOCK_SIZE,
> + },
> + {
> + .name = "uboot environment",
> + .offset = MTDPART_OFS_APPEND, /* Offset = 0x240000 */
> + .size = 2 * NAND_BLOCK_SIZE,
> + },
> + {
> + .name = "linux",
> + .offset = MTDPART_OFS_APPEND, /* Offset = 0x280000 */
> + .size = 32 * NAND_BLOCK_SIZE,
> + },
> + {
> + .name = "rootfs",
> + .offset = MTDPART_OFS_APPEND, /* Offset = 0x680000 */
> + .size = MTDPART_SIZ_FULL,
> + },
> +};
> +
> +static struct omap_nand_platform_data omap3pandora_nand_data = {
> + .parts = omap3pandora_nand_partitions,
> + .nr_parts = ARRAY_SIZE(omap3pandora_nand_partitions),
> + .dma_channel = -1, /* disable DMA in OMAP NAND driver */
tabify these:
.parts = omap3pandora_nand_partitions,
etc
> +};
> +
> +static struct resource omap3pandora_nand_resource = {
> + .flags = IORESOURCE_MEM,
> +};
this should be:
static struct resource omap3pandora_nand_resource[] = {
{
.flags = IORESOURCE_MEM,
},
};
> +
> +static struct platform_device omap3pandora_nand_device = {
> + .name = "omap2-nand",
> + .id = -1,
> + .dev = {
> + .platform_data = &omap3pandora_nand_data,
> + },
> + .num_resources = 1,
and this should be:
ARRAY_SIZE(omap3pandora_nand_resource);
> + .resource = &omap3pandora_nand_resource,
and this won't need & operator
> +};
> +
> +
one blank line is enough :-)
> +static void __init omap3pandora_flash_init(void)
> +{
> + u8 cs = 0;
> + u8 nandcs = GPMC_CS_NUM + 1;
> +
> + u32 gpmc_base_add = OMAP34XX_GPMC_VIRT;
> +
> + /* find out the chip-select on which NAND exists */
> + while (cs < GPMC_CS_NUM) {
> + u32 ret = 0;
> + ret = gpmc_cs_read_reg(cs, GPMC_CS_CONFIG1);
> +
> + if ((ret & 0xC00) == 0x800) {
> + printk(KERN_INFO "Found NAND on CS%d\n", cs);
> + if (nandcs > GPMC_CS_NUM)
> + nandcs = cs;
> + }
> + cs++;
> + }
> +
> + if (nandcs > GPMC_CS_NUM) {
> + printk(KERN_INFO "NAND: Unable to find configuration "
> + "in GPMC\n ");
> + return;
> + }
> +
> + if (nandcs < GPMC_CS_NUM) {
> + omap3pandora_nand_data.cs = nandcs;
> + omap3pandora_nand_data.gpmc_cs_baseaddr = (void *)
> + (gpmc_base_add + GPMC_CS0_BASE + nandcs * GPMC_CS_SIZE);
> + omap3pandora_nand_data.gpmc_baseaddr = (void *) (gpmc_base_add);
> +
> + printk(KERN_INFO "Registering NAND on CS%d\n", nandcs);
> + if (platform_device_register(&omap3pandora_nand_device) < 0)
> + printk(KERN_ERR "Unable to register NAND device\n");
> + }
> +}
please add a blank line here.
> +static struct omap_uart_config omap3pandora_uart_config __initdata = {
> + .enabled_uarts = (1 << 2), /* UART3 */
> +};
please add a blank line here.
> +static struct twl4030_gpio_platform_data omap3pandora_gpio_data = {
> + .gpio_base = OMAP_MAX_GPIO_LINES,
> + .irq_base = TWL4030_GPIO_IRQ_BASE,
> + .irq_end = TWL4030_GPIO_IRQ_END,
> +};
<snip>
> +static void __init omap3pandora_init(void)
> +{
> + omap3pandora_i2c_init();
> + platform_add_devices(omap3pandora_devices, ARRAY_SIZE(omap3pandora_devices));
> + omap_board_config = omap3pandora_config;
> + omap_board_config_size = ARRAY_SIZE(omap3pandora_config);
> + omap_serial_init();
> + hsmmc_init();
> + usb_musb_init();
> + usb_ehci_init();
Are you guys really using both ??
do you have an otg port on pandora ??
--
balbi
next prev parent reply other threads:[~2008-10-18 19:55 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-18 19:22 [PATCH] omap: Add basic support for Pandora handheld console Grazvydas Ignotas
2008-10-18 19:55 ` Felipe Balbi [this message]
2008-10-18 20:19 ` Grazvydas Ignotas
2008-10-18 20:40 ` Felipe Balbi
-- strict thread matches above, loose matches on Subject: below --
2008-10-18 21:55 Grazvydas Ignotas
2008-10-18 22:39 ` Felipe Balbi
2008-10-21 22:07 ` Tony Lindgren
2008-10-18 14:45 Grazvydas Ignotas
2008-10-18 15:29 ` Tony Lindgren
2008-10-18 16:05 ` notaz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20081018195518.GQ31842@frodo \
--to=me@felipebalbi.com \
--cc=linux-omap@vger.kernel.org \
--cc=notasas@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.