diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/block/sym53c8xx.c | 2 | ||||
-rw-r--r-- | drivers/input/pc_keyb.c | 2 | ||||
-rw-r--r-- | drivers/mtd/cfi_flash.c | 8 | ||||
-rw-r--r-- | drivers/pci/fsl_pci_init.c | 4 | ||||
-rw-r--r-- | drivers/pci/pci_sh4.c | 12 | ||||
-rw-r--r-- | drivers/serial/serial.c | 12 | ||||
-rw-r--r-- | drivers/serial/usbtty.c | 4 |
7 files changed, 25 insertions, 19 deletions
diff --git a/drivers/block/sym53c8xx.c b/drivers/block/sym53c8xx.c index 87b63b7..b880435 100644 --- a/drivers/block/sym53c8xx.c +++ b/drivers/block/sym53c8xx.c @@ -784,7 +784,7 @@ retry: pccb->msgout[0]=SCSI_IDENTIFY; transbytes=pccb->trans_bytes; tmpptr=pccb->pdata; - pccb->pdata=&pccb->sense_buf[0]; + pccb->pdata = &pccb->sense_buf[0]; datalen=pccb->datalen; pccb->datalen=14; tmpstat=pccb->status; diff --git a/drivers/input/pc_keyb.c b/drivers/input/pc_keyb.c index 81d3e98..33e7c5f 100644 --- a/drivers/input/pc_keyb.c +++ b/drivers/input/pc_keyb.c @@ -64,7 +64,7 @@ static int kbd_read_data(void) int val; unsigned char status; - val=-1; + val = -1; status = kbd_read_status(); if (status & KBD_STAT_OBF) { val = kbd_read_input(); diff --git a/drivers/mtd/cfi_flash.c b/drivers/mtd/cfi_flash.c index c0ea97b..4340b1b 100644 --- a/drivers/mtd/cfi_flash.c +++ b/drivers/mtd/cfi_flash.c @@ -301,7 +301,7 @@ static inline void flash_unmap(flash_info_t *info, flash_sect_t sect, /*----------------------------------------------------------------------- * make a proper sized command based on the port and chip widths */ -static void flash_make_cmd (flash_info_t * info, ulong cmd, void *cmdbuf) +static void flash_make_cmd(flash_info_t *info, u32 cmd, void *cmdbuf) { int i; int cword_offset; @@ -316,9 +316,9 @@ static void flash_make_cmd (flash_info_t * info, ulong cmd, void *cmdbuf) val = *((uchar*)&cmd + cword_offset); #else cp_offset = i - 1; - val = *((uchar*)&cmd + sizeof(ulong) - cword_offset - 1); + val = *((uchar*)&cmd + sizeof(u32) - cword_offset - 1); #endif - cp[cp_offset] = (cword_offset >= sizeof(ulong)) ? 0x00 : val; + cp[cp_offset] = (cword_offset >= sizeof(u32)) ? 0x00 : val; } } @@ -433,7 +433,7 @@ static ulong flash_read_long (flash_info_t * info, flash_sect_t sect, * Write a proper sized command to the correct address */ static void flash_write_cmd (flash_info_t * info, flash_sect_t sect, - uint offset, ulong cmd) + uint offset, u32 cmd) { void *addr; diff --git a/drivers/pci/fsl_pci_init.c b/drivers/pci/fsl_pci_init.c index 7dc33be..a7afa90 100644 --- a/drivers/pci/fsl_pci_init.c +++ b/drivers/pci/fsl_pci_init.c @@ -59,8 +59,8 @@ fsl_pci_init(struct pci_controller *hose) pci_dev_t dev = PCI_BDF(busno,0,0); /* Initialize ATMU registers based on hose regions and flags */ - volatile pot_t *po=&pci->pot[1]; /* skip 0 */ - volatile pit_t *pi=&pci->pit[0]; /* ranges from: 3 to 1 */ + volatile pot_t *po = &pci->pot[1]; /* skip 0 */ + volatile pit_t *pi = &pci->pit[0]; /* ranges from: 3 to 1 */ #ifdef DEBUG int neg_link_w; diff --git a/drivers/pci/pci_sh4.c b/drivers/pci/pci_sh4.c index 1290c0a..057b6dd 100644 --- a/drivers/pci/pci_sh4.c +++ b/drivers/pci/pci_sh4.c @@ -74,3 +74,15 @@ int pci_sh4_init(struct pci_controller *hose) hose->last_busno = pci_hose_scan(hose); return 0; } + +int pci_skip_dev(struct pci_controller *hose, pci_dev_t dev) +{ + return 0; +} + +#ifdef CONFIG_PCI_SCAN_SHOW +int pci_print_dev(struct pci_controller *hose, pci_dev_t dev) +{ + return 1; +} +#endif /* CONFIG_PCI_SCAN_SHOW */ diff --git a/drivers/serial/serial.c b/drivers/serial/serial.c index 4ccaee2..8bbfcf9 100644 --- a/drivers/serial/serial.c +++ b/drivers/serial/serial.c @@ -124,8 +124,6 @@ static NS16550_t serial_ports[4] = { static int calc_divisor (NS16550_t port) { - uint32_t clk_divisor; - #ifdef CONFIG_OMAP1510 /* If can't cleanly clock 115200 set div to 1 */ if ((CFG_NS16550_CLK == 12000000) && (gd->baudrate == 115200)) { @@ -149,15 +147,11 @@ static int calc_divisor (NS16550_t port) /* Compute divisor value. Normally, we should simply return: * CFG_NS16550_CLK) / MODE_X_DIV / gd->baudrate - * but we need to round that value by adding 0.5 (2/4). + * but we need to round that value by adding 0.5. * Rounding is especially important at high baud rates. */ - clk_divisor = (((4 * CFG_NS16550_CLK) / - (MODE_X_DIV * gd->baudrate)) + 2) / 4; - - debug("NS16550 clock divisor = %d\n", clk_divisor); - - return clk_divisor; + return (CFG_NS16550_CLK + (gd->baudrate * (MODE_X_DIV / 2))) / + (MODE_X_DIV * gd->baudrate); } #if !defined(CONFIG_SERIAL_MULTI) diff --git a/drivers/serial/usbtty.c b/drivers/serial/usbtty.c index cc2bdac..2bc5c3c 100644 --- a/drivers/serial/usbtty.c +++ b/drivers/serial/usbtty.c @@ -529,8 +529,8 @@ int drv_usbtty_init (void) } snlen = strlen(sn); if (snlen > sizeof(serial_number) - 1) { - printf ("Warning: serial number %s is too long (%d > %d)\n", - sn, snlen, sizeof(serial_number) - 1); + printf ("Warning: serial number %s is too long (%d > %lu)\n", + sn, snlen, (ulong)(sizeof(serial_number) - 1)); snlen = sizeof(serial_number) - 1; } memcpy (serial_number, sn, snlen); |