diff --git a/arch/arm/cpu/armv7/am33xx/board.c b/arch/arm/cpu/armv7/am33xx/board.c index dcbf6f84ae..a99cbf9de0 100644 --- a/arch/arm/cpu/armv7/am33xx/board.c +++ b/arch/arm/cpu/armv7/am33xx/board.c @@ -45,12 +45,9 @@ static const struct ns16550_platdata am33xx_serial[] = { { .base = CONFIG_SYS_NS16550_COM2, .reg_shift = 2, .clock = CONFIG_SYS_NS16550_CLK }, # ifdef CONFIG_SYS_NS16550_COM3 { .base = CONFIG_SYS_NS16550_COM3, .reg_shift = 2, .clock = CONFIG_SYS_NS16550_CLK }, - -# if 0 /* TODO: @@@rs */ { .base = CONFIG_SYS_NS16550_COM4, .reg_shift = 2, .clock = CONFIG_SYS_NS16550_CLK }, { .base = CONFIG_SYS_NS16550_COM5, .reg_shift = 2, .clock = CONFIG_SYS_NS16550_CLK }, { .base = CONFIG_SYS_NS16550_COM6, .reg_shift = 2, .clock = CONFIG_SYS_NS16550_CLK }, -# endif # endif # endif }; @@ -61,11 +58,9 @@ U_BOOT_DEVICES(am33xx_uarts) = { { "ns16550_serial", &am33xx_serial[1] }, # ifdef CONFIG_SYS_NS16550_COM3 { "ns16550_serial", &am33xx_serial[2] }, -# if 0 /* TODO: @@@rs */ { "ns16550_serial", &am33xx_serial[3] }, { "ns16550_serial", &am33xx_serial[4] }, { "ns16550_serial", &am33xx_serial[5] }, -# endif # endif # endif }; diff --git a/arch/arm/cpu/armv7/am33xx/clock_am33xx.c b/arch/arm/cpu/armv7/am33xx/clock_am33xx.c index 063b96d03c..e233932364 100644 --- a/arch/arm/cpu/armv7/am33xx/clock_am33xx.c +++ b/arch/arm/cpu/armv7/am33xx/clock_am33xx.c @@ -170,7 +170,7 @@ void enable_basic_clocks(void) &cmper->usb0clkctrl, &cmper->emiffwclkctrl, &cmper->emifclkctrl, - &cmper->i2c2clkctrl, /* TODO: Check whether required now that I2C1 is used */ + &cmper->i2c2clkctrl, &cmper->spi1clkctrl, 0 }; diff --git a/board/nm/nrhw24/fileaccess.c b/board/nm/nrhw24/fileaccess.c index 13768b032e..f296704637 100644 --- a/board/nm/nrhw24/fileaccess.c +++ b/board/nm/nrhw24/fileaccess.c @@ -1,6 +1,7 @@ #include #include +#define BLOCK_DEVICE "mmc" #define OVERLAY_PART "1:3" int read_file(const char* filename, char *buf, int size) @@ -9,14 +10,12 @@ int read_file(const char* filename, char *buf, int size) loff_t len; int ret; - /* If consoldev is set take this as productive conosle instead of default console */ - if (fs_set_blk_dev("mmc", OVERLAY_PART, FS_TYPE_EXT) != 0) { + if (fs_set_blk_dev(BLOCK_DEVICE, OVERLAY_PART, FS_TYPE_EXT) != 0) { puts("Error, can not set blk device\n"); return -1; } - - /* File does not exist, do not print an error message */ + /* Read at most file size bytes */ if (fs_size(filename, &filesize)) { return -1; } @@ -24,13 +23,12 @@ int read_file(const char* filename, char *buf, int size) if (filesize < size) size = filesize; - /* If consoldev is set take this as productive conosle instead of default console */ - if (fs_set_blk_dev("mmc", OVERLAY_PART, FS_TYPE_EXT) != 0) { + /* For very unclear reasons the block device needs to be set again after the call to fs_size() */ + if (fs_set_blk_dev(BLOCK_DEVICE, OVERLAY_PART, FS_TYPE_EXT) != 0) { puts("Error, can not set blk device\n"); return -1; } - if ((ret = fs_read(filename, (ulong)buf, 0, size, &len))) { printf("Can't read file %s (size %d, len %lld, ret %d)\n", filename, size, len, ret); return -1; diff --git a/board/nm/nrhw24/u-boot.lds b/board/nm/nrhw24/u-boot.lds index ba0157f6f4..a41565b648 100644 --- a/board/nm/nrhw24/u-boot.lds +++ b/board/nm/nrhw24/u-boot.lds @@ -36,7 +36,7 @@ SECTIONS *(.__image_copy_start) *(.vectors) CPUDIR/start.o (.text*) - board/nm/nrhw24/built-in.o (.text*) + board/nm/nrhw24/built-in.o (.text*) *(.text*) } diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c index 9d4e6956ef..e2f57deaaa 100644 --- a/drivers/net/phy/phy.c +++ b/drivers/net/phy/phy.c @@ -243,7 +243,6 @@ int genphy_update_link(struct phy_device *phydev) if ((phydev->autoneg == AUTONEG_ENABLE) && !(mii_reg & BMSR_ANEGCOMPLETE)) { - const int timeout = PHY_ANEG_TIMEOUT; int i = 0; printf("%s Waiting for PHY auto negotiation to complete", @@ -252,7 +251,7 @@ int genphy_update_link(struct phy_device *phydev) /* * Timeout reached ? */ - if (i > timeout) { + if (i > PHY_ANEG_TIMEOUT) { printf(" TIMEOUT !\n"); phydev->link = 0; return -ETIMEDOUT; diff --git a/fs/fs.c b/fs/fs.c index 595ff1fe69..165f1b6ba3 100644 --- a/fs/fs.c +++ b/fs/fs.c @@ -307,8 +307,6 @@ int fs_read(const char *filename, ulong addr, loff_t offset, loff_t len, unmap_sysmem(buf); /* If we requested a specific number of bytes, check we got it */ - if (ret == 0 && len && *actread != len) - printf("** %s shorter than offset + len **\n", filename); fs_close(); return ret;