diff --git a/board/bluewater/gurnard/gurnard.c b/board/bluewater/gurnard/gurnard.c index 3275803226a..71db6409721 100644 --- a/board/bluewater/gurnard/gurnard.c +++ b/board/bluewater/gurnard/gurnard.c @@ -29,7 +29,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/board/siemens/corvus/board.c b/board/siemens/corvus/board.c index 4c83774fceb..c0a94ac904f 100644 --- a/board/siemens/corvus/board.c +++ b/board/siemens/corvus/board.c @@ -20,7 +20,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/board/siemens/smartweb/smartweb.c b/board/siemens/smartweb/smartweb.c index 6fa3ca573ae..ce16aad3b98 100644 --- a/board/siemens/smartweb/smartweb.c +++ b/board/siemens/smartweb/smartweb.c @@ -25,7 +25,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/board/siemens/taurus/taurus.c b/board/siemens/taurus/taurus.c index 252b0787124..690c00046fa 100644 --- a/board/siemens/taurus/taurus.c +++ b/board/siemens/taurus/taurus.c @@ -24,7 +24,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/drivers/mtd/nand/raw/atmel/nand-controller.c b/drivers/mtd/nand/raw/atmel/nand-controller.c index c90a4eab8df..d6e940d4a90 100644 --- a/drivers/mtd/nand/raw/atmel/nand-controller.c +++ b/drivers/mtd/nand/raw/atmel/nand-controller.c @@ -1010,10 +1010,10 @@ static int atmel_nand_pmecc_init(struct nand_chip *chip) if (nc->caps->legacy_of_bindings) { u32 val; - if (!ofnode_read_u32(nc->dev->node_, "atmel,pmecc-cap", &val)) + if (!ofnode_read_u32(dev_ofnode(nc->dev), "atmel,pmecc-cap", &val)) chip->ecc.strength = val; - if (!ofnode_read_u32(nc->dev->node_, + if (!ofnode_read_u32(dev_ofnode(nc->dev), "atmel,pmecc-sector-size", &val)) chip->ecc.size = val; @@ -1671,7 +1671,7 @@ static int atmel_nand_controller_add_nands(struct atmel_nand_controller *nc) * Add support for legacy nands */ - np = nc->dev->node_; + np = dev_ofnode(nc->dev); ret = ofnode_read_u32(np, "#address-cells", &val); if (ret) { @@ -1791,7 +1791,7 @@ static int atmel_nand_attach_chip(struct nand_chip *chip) if (ret) return ret; - if (nc->caps->legacy_of_bindings || !ofnode_valid(nc->dev->node_)) { + if (nc->caps->legacy_of_bindings || !ofnode_valid(dev_ofnode(nc->dev))) { /* * We keep the MTD name unchanged to avoid breaking platforms * where the MTD cmdline parser is used and the bootloader @@ -1855,7 +1855,7 @@ atmel_nand_controller_init(struct atmel_nand_controller *nc, return PTR_ERR(nc->mck); } - ret = ofnode_parse_phandle_with_args(dev->parent->node_, + ret = ofnode_parse_phandle_with_args(dev_ofnode(dev->parent), "atmel,smc", NULL, 0, 0, &args); if (ret) { dev_err(dev, "Missing or invalid atmel,smc property\n"); @@ -1887,7 +1887,7 @@ atmel_smc_nand_controller_init(struct atmel_smc_nand_controller *nc) if (nc->base.caps->legacy_of_bindings) return 0; - ret = ofnode_parse_phandle_with_args(dev->parent->node_, + ret = ofnode_parse_phandle_with_args(dev_ofnode(dev->parent), nc->base.caps->ebi_csa_regmap_name, NULL, 0, 0, &args); if (ret) { @@ -1933,7 +1933,7 @@ static int atmel_hsmc_nand_controller_init(struct atmel_hsmc_nand_controller *nc int ret; u32 addr; - ret = ofnode_parse_phandle_with_args(dev->parent->node_, + ret = ofnode_parse_phandle_with_args(dev_ofnode(dev->parent), "atmel,smc", NULL, 0, 0, &args); if (ret) { dev_err(dev, "Missing or invalid atmel,smc property\n"); @@ -1957,7 +1957,7 @@ static int atmel_hsmc_nand_controller_init(struct atmel_hsmc_nand_controller *nc if (ret) return ret; - ret = ofnode_parse_phandle_with_args(dev->node_, + ret = ofnode_parse_phandle_with_args(dev_ofnode(dev), "atmel,nfc-io", NULL, 0, 0, &args); if (ret) { dev_err(dev, "Missing or invalid atmel,nfc-io property\n"); @@ -1971,7 +1971,7 @@ static int atmel_hsmc_nand_controller_init(struct atmel_hsmc_nand_controller *nc return ret; } - ret = ofnode_parse_phandle_with_args(dev->node_, + ret = ofnode_parse_phandle_with_args(dev_ofnode(dev), "atmel,nfc-sram", NULL, 0, 0, &args); if (ret) { dev_err(dev, "Missing or invalid atmel,nfc-sram property\n"); diff --git a/drivers/mtd/nand/raw/atmel/pmecc.c b/drivers/mtd/nand/raw/atmel/pmecc.c index 1acaa5d0e07..e25d782aa30 100644 --- a/drivers/mtd/nand/raw/atmel/pmecc.c +++ b/drivers/mtd/nand/raw/atmel/pmecc.c @@ -833,9 +833,9 @@ atmel_pmecc_create(struct udevice *dev, pmecc->dev = dev; mutex_init(&pmecc->lock); - ofnode_read_resource(dev->node_, 0, &res); + ofnode_read_resource(dev_ofnode(dev), 0, &res); pmecc->regs.base = (void *)res.start; - ofnode_read_resource(dev->node_, 1, &res); + ofnode_read_resource(dev_ofnode(dev), 1, &res); pmecc->regs.errloc = (void *)res.start; /* pmecc data setup time */ @@ -913,7 +913,7 @@ struct atmel_pmecc *devm_atmel_pmecc_get(struct udevice *userdev) if (!userdev) return ERR_PTR(-EINVAL); - ret = ofnode_parse_phandle_with_args(userdev->node_, + ret = ofnode_parse_phandle_with_args(dev_ofnode(userdev), "ecc-engine", NULL, 0, 0, &args); /* Probe pmecc driver */ diff --git a/drivers/serial/atmel_usart.c b/drivers/serial/atmel_usart.c index 0b35582aaa4..e1db4dfe00d 100644 --- a/drivers/serial/atmel_usart.c +++ b/drivers/serial/atmel_usart.c @@ -18,10 +18,12 @@ #include #if CONFIG_IS_ENABLED(DM_SERIAL) -#include +#include #endif +#if IS_ENABLED(CONFIG_ARCH_AT91) #include #include +#endif #include "atmel_usart.h" @@ -316,6 +318,9 @@ static inline void _debug_uart_init(void) { atmel_usart3_t *usart = (atmel_usart3_t *)CONFIG_VAL(DEBUG_UART_BASE); + if (IS_ENABLED(CONFIG_DEBUG_UART_SKIP_INIT)) + return; + _atmel_serial_init(usart, CONFIG_DEBUG_UART_CLOCK, CONFIG_BAUDRATE); } diff --git a/arch/arm/mach-at91/include/mach/atmel_serial.h b/include/dm/platform_data/atmel_serial.h similarity index 90% rename from arch/arm/mach-at91/include/mach/atmel_serial.h rename to include/dm/platform_data/atmel_serial.h index 5d142693640..96da6f50287 100644 --- a/arch/arm/mach-at91/include/mach/atmel_serial.h +++ b/include/dm/platform_data/atmel_serial.h @@ -8,7 +8,7 @@ /* Information about a serial port */ struct atmel_serial_plat { - uint32_t base_addr; + uintptr_t base_addr; }; #endif