PXA: Fix Lubbock, remove redundant parenthesis
Subsystems (2)
PATCH 1/4 PXA: Fix Lubbock, remove redundant parenthesis
--- board/lubbock/flash.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
board/lubbock/flash.c +1 -1
@@ -408,7 +408,7 @@ static int write_data (flash_info_t *info, ulong dest, FPW data)/* wait while polling the status register */ while (((status = *addr) & (FPW )0x00800080 ) != (FPW )0x00800080 ) { - if (get_timer(start)) > CONFIG_SYS_FLASH_WRITE_TOUT) { +if (get_timer (start) >CONFIG_SYS_FLASH_WRITE_TOUT ) { *addr = (FPW )0x00FF00FF ;/* restore read mode */ return (1 ); }
Signature · 1 line
1.7.5.4
PATCH 2/4 PXA: Fix CSB226, fix monitor length
This is what was probably intended by the original author.
--- include/configs/csb226.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
include/configs/csb226.h +1 -1
@@ -141,7 +141,7 @@/* ^^ Run Mode Speed = 2x Mem Speed */ /* ^^ Turbo Mode Sp. = 1x Run M. Sp. */ -#define CONFIG_SYS_MONITOR_LEN 0x20000/* 128 KiB */ +#define CONFIG_SYS_MONITOR_LEN 0x1c000/* 112 KiB */ /* valid baudrates */ #define CONFIG_SYS_BAUDRATE_TABLE { 9600, 19200, 38400, 57600, 115200 }
Signature · 1 line
1.7.5.4
PATCH 3/4 USB: Fix anti-aliasing complaints in OHCI-HCD
In reply to Marek Vasut--- drivers/usb/host/ohci-hcd.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/usb/host/ohci-hcd.c +1 -1
@@ -1262,7 +1262,7 @@ static int ohci_submit_rh_msg(struct usb_device *dev, unsigned long pipe,int leni = transfer_len;int len =0 ;int stat =0 ; -__u32 datab[4 ]; + __u8 datab[16] __attribute__((aligned(4)));__u8 *data_buf = (__u8 *)datab;__u16 bmRType_bReq;__u16 wValue;
Signature · 1 line
1.7.5.4
PATCH 3/4 USB: Fix anti-aliasing complaints in OHCI-HCD
Quoted 1 line · Marek Vasut
Signed-off-by Marek Vasut <[email protected]>
Dang, I mistyped Remy's address ... fixed.
Quoted 17 lines
--- drivers/usb/host/ohci-hcd.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)drivers/usb/host/ohci-hcd.c +1
-1@@ -1262,7 +1262,7 @@ static int ohci_submit_rh_msg(struct usb_device *dev, unsigned long pipe, int leni = transfer_len;int len =0 ;int stat =0 ; -__u32 datab[4 ]; + __u8 datab[16] __attribute__((aligned(4)));__u8 *data_buf = (__u8 *)datab;__u16 bmRType_bReq;__u16 wValue;
PATCH 3/4 USB: Fix anti-aliasing complaints in OHCI-HCD
In reply to Marek Vasutdrivers/usb/host/ohci-hcd.c static int ohci_submit_rh_msg(struct usb_device *dev, unsigned long pipe, · line 1266
Quoted 3 lines · On Saturday, August 20, 2011 09:28:43 Marek Vasut wrote:
drivers/usb/host/ohci-hcd.c +1
-1-__u32 datab[4 ]; + __u8 datab[16] __attribute__((aligned(4)));__u8 *data_buf = (__u8 *)datab;
leverage a union to avoid attributes:
union {
__u32 u32[4];
__u8 u8[16];
} datab;__u8 *data_buf = datab.u8;
also, it isn't "anti-aliasing complaints", it's "fix strict aliasing violations". "anti-aliasing" is something completely different in the computing world :p.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20110820/46c7a751/attachment.pgp
PATCH 3/4 USB: Fix anti-aliasing complaints in OHCI-HCD
Quoted 11 lines · Mike Frysinger
drivers/usb/host/ohci-hcd.c static int ohci_submit_rh_msg(struct usb_device *dev, unsigned long pipe, · line 1266
Quoted 4 lines · On Saturday, August 20, 2011 09:28:43 Marek Vasut wrote:
drivers/usb/host/ohci-hcd.c +1
-1-__u32 datab[4 ]; + __u8 datab[16] __attribute__((aligned(4)));__u8 *data_buf = (__u8 *)datab;leverage a union to avoid attributes:
union { __u32 u32[4]; __u8 u8[16]; } datab;
Quoted 5 lines
__u8*data_buf= datab.u8;also, it isn't "anti-aliasing complaints", it's "fix strict aliasing violations". "anti-aliasing" is something completely different in the computing world :p.
Well I guess my brain just saw the compiler output differently ... thanks for the catch.
Quoted 1 line
-mike
PATCH 4/4 IDE: Fix anti-aliasing in cmd_ide.c
In reply to Marek Vasut--- common/cmd_ide.c | 51 +++++++++++++++++++++++++-------------------------- 1 files changed, 25 insertions(+), 26 deletions(-)
common/cmd_ide.c +25 -26
@@ -985,9 +985,8 @@ input_data(int dev, ulong *sect_buf, int words)*/ static void ide_ident (block_dev_desc_t *dev_desc) { -ulong iobuf[ATA_SECTORWORDS ];unsigned char c; -hd_driveid_t *iop = (hd_driveid_t *)iobuf; + hd_driveid_t iop __attribute__((aligned(4)));#ifdef CONFIG_ATAPI int retries =0 ;
@@ -1073,11 +1072,11 @@ static void ide_ident (block_dev_desc_t *dev_desc)return ;#endif -input_swap_data (device, iobuf,ATA_SECTORWORDS ); +input_swap_data (device, (ulong *)&iop,ATA_SECTORWORDS ); -ident_cpy ((unsigned char *)dev_desc->revision, iop->fw_rev,sizeof (dev_desc->revision)); -ident_cpy ((unsigned char *)dev_desc->vendor, iop->model,sizeof (dev_desc->vendor)); -ident_cpy ((unsigned char *)dev_desc->product, iop->serial_no,sizeof (dev_desc->product)); +ident_cpy ((unsigned char *)dev_desc->revision, iop.fw_rev,sizeof (dev_desc->revision)); +ident_cpy ((unsigned char *)dev_desc->vendor, iop.model,sizeof (dev_desc->vendor)); +ident_cpy ((unsigned char *)dev_desc->product, iop.serial_no,sizeof (dev_desc->product));#ifdef __LITTLE_ENDIAN/* * firmware revision, model, and serial number have Big Endian Byte
@@ -1092,14 +1091,14 @@ static void ide_ident (block_dev_desc_t *dev_desc)strswab (dev_desc->product);#endif /* __LITTLE_ENDIAN */ -if ((iop->config &0x0080 )==0x0080 ) +if ((iop.config &0x0080 ) ==0x0080 ) dev_desc->removable =1 ;else dev_desc->removable =0 ;#ifdef CONFIG_TUNE_PIO /* Mode 0 - 2 only, are directly determined by word 51. */ - pio_mode = iop->tPIO; + pio_mode = iop.tPIO;if (pio_mode >2 ) {printf ("WARNING: Invalid PIO (word 51 = %d).\n" , pio_mode); pio_mode =0 ;/* Force it to dead slow, and hope for the best... */
@@ -1109,18 +1108,18 @@ static void ide_ident (block_dev_desc_t *dev_desc)* shall set bit 1 of word 53 to one and support the fields contained * in words 64 through 70. */ -if (iop->field_valid &0x02 ) { +if (iop.field_valid &0x02 ) {/* Mode 3 and above are possible. Check in order from slow * to fast, so we wind up with the highest mode allowed. */ -if (iop->eide_pio_modes &0x01 ) +if (iop.eide_pio_modes &0x01 ) pio_mode =3 ; -if (iop->eide_pio_modes &0x02 ) +if (iop.eide_pio_modes &0x02 ) pio_mode =4 ; -if (ata_id_is_cfa ((u16 *)iop)) { -if ((iop->cf_advanced_caps &0x07 ) ==0x01 ) +if (ata_id_is_cfa ((u16 *)&iop)) { +if ((iop.cf_advanced_caps &0x07 ) ==0x01 ) pio_mode =5 ; -if ((iop->cf_advanced_caps &0x07 ) ==0x02 ) +if ((iop.cf_advanced_caps &0x07 ) ==0x02 ) pio_mode =6 ; } }
@@ -1133,19 +1132,19 @@ static void ide_ident (block_dev_desc_t *dev_desc)/* * Drive PIO mode autoselection */ - mode = iop->tPIO; + mode = iop.tPIO;printf ("tPIO = 0x%02x = %d\n" ,mode, mode);if (mode >2 ) {/* 2 is maximum allowed tPIO value */ mode =2 ;debug ("Override tPIO -> 2\n" ); } -if (iop->field_valid &2 ) {/* drive implements ATA2? */ +if (iop.field_valid &2 ) {/* drive implements ATA2? */ debug ("Drive implements ATA2\n" ); -if (iop->capability &8 ) {/* drive supports use_iordy? */ - cycle_time = iop->eide_pio_iordy; +if (iop.capability &8 ) {/* drive supports use_iordy? */ + cycle_time = iop.eide_pio_iordy; }else { - cycle_time = iop->eide_pio; + cycle_time = iop.eide_pio; }debug ("cycle time = %d\n" , cycle_time); mode =4 ;
@@ -1166,7 +1165,7 @@ static void ide_ident (block_dev_desc_t *dev_desc)#ifdef __BIG_ENDIAN/* swap shorts */ - dev_desc->lba = (iop->lba_capacity <<16 ) | (iop->lba_capacity >>16 ); + dev_desc->lba = (iop.lba_capacity <<16 ) | (iop.lba_capacity >>16 );#else /* ! __BIG_ENDIAN */ /* * do not swap shorts on little endian
@@ -1174,16 +1173,16 @@ static void ide_ident (block_dev_desc_t *dev_desc)* See CF+ and CompactFlash Specification Revision 2.0: * 6.2.1.6: Identfy Drive, Table 39, Word Address 57-58 for details. */ - dev_desc->lba = iop->lba_capacity; + dev_desc->lba = iop.lba_capacity;#endif /* __BIG_ENDIAN */ #ifdef CONFIG_LBA48 -if (iop->command_set_2 &0x0400 ) {/* LBA 48 support */ +if (iop.command_set_2 &0x0400 ) {/* LBA 48 support */ dev_desc->lba48 =1 ; - dev_desc->lba = (unsigned long long )iop->lba48_capacity[0 ] | - ((unsigned long long )iop->lba48_capacity[1 ] <<16 ) | - ((unsigned long long )iop->lba48_capacity[2 ] <<32 ) | - ((unsigned long long )iop->lba48_capacity[3 ] <<48 ); + dev_desc->lba = (unsigned long long )iop.lba48_capacity[0 ] | + ((unsigned long long )iop.lba48_capacity[1 ] <<16 ) | + ((unsigned long long )iop.lba48_capacity[2 ] <<32 ) | + ((unsigned long long )iop.lba48_capacity[3 ] <<48 ); }else { dev_desc->lba48 =0 ; }
Signature · 1 line
1.7.5.4
PATCH 4/4 IDE: Fix anti-aliasing in cmd_ide.c
common/cmd_ide.c input_data(int dev, ulong *sect_buf, int words) · line 989
Quoted 4 lines · On Saturday, August 20, 2011 09:28:44 Marek Vasut wrote:
common/cmd_ide.c +1
-2-ulong iobuf[ATA_SECTORWORDS ];unsigned char c; -hd_driveid_t *iop = (hd_driveid_t *)iobuf; + hd_driveid_t iop __attribute__((aligned(4)));
gcc takes care of making sure the hd_driveid_t struct has proper alignment on the stack. i see it has at least one unsigned int in there, so that gets you 4byte alignment. so drop the attribute.
also, same comment as the other patch ... please change your log/summary to say "fix strict aliasing violations".
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20110820/97af01ef/attachment.pgp