linux-mips
[Top] [All Lists]

Re: [PATCH][2/2] TANBAC TB0193 (L-Card+)

To: TAKANO Ryousei <takano@os-omicron.org>
Subject: Re: [PATCH][2/2] TANBAC TB0193 (L-Card+)
From: Juan Quintela <quintela@mandrakesoft.com>
Date: Mon, 17 Feb 2003 10:21:31 +0100
Cc: linux-mips@linux-mips.org
In-reply-to: <20030217133222.13f9adf8.takano@os-omicron.org> (TAKANO Ryousei's message of "Mon, 17 Feb 2003 13:32:22 +0900")
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <20030217133222.13f9adf8.takano@os-omicron.org>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Gnus/5.090014 (Oort Gnus v0.14) Emacs/21.2.93 (i386-mandrake-linux-gnu)
>>>>> "takano" == TAKANO Ryousei <takano@os-omicron.org> writes:

takano> Hi,
takano> This mail attaches tanbac-tb0193-drivers.patch.

a cople of comments:

+static __u32 tb0193_read32(struct map_info *map, unsigned long ofs)
        ^^^^^

plain uXX instead of __uXX should work on kernel land.

+static struct map_info tb0193_map = {
+       name:           "TANBAC TB0193 flash",
+       read8:          tb0193_read8,
+       read16:         tb0193_read16,
+       read32:         tb0193_read32,
+       copy_from:      tb0193_copy_from,
+       write8:         tb0193_write8,
+       write16:        tb0193_write16,
+       write32:        tb0193_write32,
+       copy_to:        tb0193_copy_to,
+
+       map_priv_1:     WINDOW_ADDR,
+};

Please, use C99 initializers.

+static unsigned long lcard_max_flash_size = 0x01000000;
+static struct mtd_partition lcard_partitions[] = {
+       { 
+               name:           "root file system",
+               offset:         0x00000000,
+               size:           0x00c00000,
+       },{
+               name:           "monitor",
+               offset:         0x00c00000,
+               size:           0x00020000,
+                mask_flags:    MTD_WRITEABLE,
+       },{
+               name:           "reserved",
+               offset:         0x00c20000,
+               size:           0x000e0000,
+       },{
+               name:           "kernel",
+               offset:         0x00d00000,
+               size:           0x00300000,
+       },
+};

at least for the structs use the C99 initializers.

Later, Juan.

-- 
In theory, practice and theory are the same, but in practice they 
are different -- Larry McVoy

<Prev in Thread] Current Thread [Next in Thread>