diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/mtd/dataflash.c | 45 | ||||
-rw-r--r-- | drivers/mtd/nand/nand_ids.c | 2 | ||||
-rw-r--r-- | drivers/net/s3c4510b_eth.h | 16 | ||||
-rw-r--r-- | drivers/rtc/ds174x.c | 3 | ||||
-rw-r--r-- | drivers/usb/usb_ohci.c | 1 |
5 files changed, 12 insertions, 55 deletions
diff --git a/drivers/mtd/dataflash.c b/drivers/mtd/dataflash.c index d8f78f2..8247aa0 100644 --- a/drivers/mtd/dataflash.c +++ b/drivers/mtd/dataflash.c @@ -22,39 +22,8 @@ #include <asm/hardware.h> #include <dataflash.h> -AT91S_DATAFLASH_INFO dataflash_info[CFG_MAX_DATAFLASH_BANKS]; static AT91S_DataFlash DataFlashInst; -struct dataflash_addr { - unsigned long addr; - int cs; -}; - -#if defined(CONFIG_AT91SAM9260EK) -struct dataflash_addr cs[CFG_MAX_DATAFLASH_BANKS] = { - {CFG_DATAFLASH_LOGIC_ADDR_CS0, 0}, /* Logical adress, CS */ - {CFG_DATAFLASH_LOGIC_ADDR_CS1, 1} -}; -#elif defined(CONFIG_AT91SAM9263EK) || defined(CONFIG_AT91CAP9ADK) -struct dataflash_addr cs[CFG_MAX_DATAFLASH_BANKS] = { - {CFG_DATAFLASH_LOGIC_ADDR_CS0, 0}, /* Logical adress, CS */ -}; -#else -struct dataflash_addr cs[CFG_MAX_DATAFLASH_BANKS] = { - {CFG_DATAFLASH_LOGIC_ADDR_CS0, 0}, /* Logical adress, CS */ - {CFG_DATAFLASH_LOGIC_ADDR_CS3, 3} -}; -#endif - -/*define the area offsets*/ -dataflash_protect_t area_list[NB_DATAFLASH_AREA] = { - {0x00000000, 0x000041FF, FLAG_PROTECT_SET, 0, "Bootstrap"}, - {0x00004200, 0x000083FF, FLAG_PROTECT_CLEAR, 0, "Environment"}, - {0x00008400, 0x0003DDFF, FLAG_PROTECT_SET, 0, "U-Boot"}, - {0x0003DE00, 0x0023DE3F, FLAG_PROTECT_CLEAR, 0, "Kernel"}, - {0x0023DE40, 0xFFFFFFFF, FLAG_PROTECT_CLEAR, 0, "FS"}, -}; - extern void AT91F_SpiInit (void); extern int AT91F_DataflashProbe (int i, AT91PS_DataflashDesc pDesc); extern int AT91F_DataFlashRead (AT91PS_DataFlash pDataFlash, @@ -178,8 +147,7 @@ int AT91F_DataflashInit (void) return found[0]; } -#ifdef CONFIG_NEW_DF_PARTITION -int AT91F_DataflashSetEnv (void) +void AT91F_DataflashSetEnv (void) { int i, j; int part; @@ -194,14 +162,13 @@ int AT91F_DataflashSetEnv (void) if((env & FLAG_SETENV) == FLAG_SETENV) { start = dataflash_info[i].Device.area_list[j].start; - sprintf(s,"%X",start); - setenv(area_list[part].label,s); + sprintf((char*) s,"%X",start); + setenv((char*) area_list[part].label,(char*) s); } part++; } } } -#endif void dataflash_print_info (void) { @@ -244,16 +211,10 @@ void dataflash_print_info (void) dataflash_info[i].Device.area_list[j].start, dataflash_info[i].Device.area_list[j].end, (dataflash_info[i].Device.area_list[j].protected==FLAG_PROTECT_SET) ? "(RO)" : " "); -#ifdef CONFIG_NEW_DF_PARTITION printf(" %s\n", dataflash_info[i].Device.area_list[j].label); -#else - printf("\n"); -#endif break; -#ifdef CONFIG_NEW_DF_PARTITION case FLAG_PROTECT_INVALID: break; -#endif } } } diff --git a/drivers/mtd/nand/nand_ids.c b/drivers/mtd/nand/nand_ids.c index 6d7e347..524b6b1 100644 --- a/drivers/mtd/nand/nand_ids.c +++ b/drivers/mtd/nand/nand_ids.c @@ -67,8 +67,6 @@ struct nand_flash_dev nand_flash_ids[] = { {"NAND 256MiB 3,3V 8-bit", 0x71, 512, 256, 0x4000, 0}, - {"NAND 512MiB 3,3V 8-bit", 0xDC, 512, 512, 0x4000, 0}, - /* These are the new chips with large page size. The pagesize * and the erasesize is determined from the extended id bytes */ diff --git a/drivers/net/s3c4510b_eth.h b/drivers/net/s3c4510b_eth.h index cbddba7..048307f 100644 --- a/drivers/net/s3c4510b_eth.h +++ b/drivers/net/s3c4510b_eth.h @@ -30,8 +30,6 @@ * */ -#define __packed __attribute__ ((packed)) - #define ETH_MAC_ADDR_SIZE (6) /* dst,src addr is 6bytes each */ #define ETH_MaxTxFrames (16) /* Max number of Tx Frames */ @@ -283,12 +281,14 @@ typedef struct __RX_FrameDescriptor { } RX_FrameDescriptor; /* MAC Frame Structure */ -typedef struct __MACFrame { - u8 m_dstAddr[6] __packed; - u8 m_srcAddr[6] __packed; - u16 m_lengthOrType __packed; - u8 m_payload[1506] __packed; -} MACFrame; +struct __MACFrame { + u8 m_dstAddr[6]; + u8 m_srcAddr[6]; + u16 m_lengthOrType; + u8 m_payload[1506]; +} __attribute__ ((packed)); + +typedef struct __MACFrame MACFrame; /* Ethernet Control block */ typedef struct __ETH { diff --git a/drivers/rtc/ds174x.c b/drivers/rtc/ds174x.c index 81a9cb3..eb3ca88 100644 --- a/drivers/rtc/ds174x.c +++ b/drivers/rtc/ds174x.c @@ -114,6 +114,7 @@ int rtc_get( struct rtc_time *tmp ) tmp->tm_year, tmp->tm_mon, tmp->tm_mday, tmp->tm_wday, tmp->tm_hour, tmp->tm_min, tmp->tm_sec ); #endif + return 0; } void rtc_set( struct rtc_time *tmp ) @@ -142,8 +143,6 @@ void rtc_set( struct rtc_time *tmp ) /* unlock clock registers after read */ rtc_write( RTC_CONTROLA, ( reg_a & ~RTC_CA_WRITE )); - - return 0; } void rtc_reset (void) diff --git a/drivers/usb/usb_ohci.c b/drivers/usb/usb_ohci.c index 829bbca..5c201b3 100644 --- a/drivers/usb/usb_ohci.c +++ b/drivers/usb/usb_ohci.c @@ -111,7 +111,6 @@ static struct pci_device_id ohci_pci_ids[] = { #define dbg(format, arg...) do {} while(0) #endif /* DEBUG */ #define err(format, arg...) printf("ERROR: " format "\n", ## arg) -#undef SHOW_INFO #ifdef SHOW_INFO #define info(format, arg...) printf("INFO: " format "\n", ## arg) #else |