Commit 3f394e70f0cc31a5d63d3650fd4f48e450ea16cd
Committed by
Tom Rini
1 parent
e0266f4942
Exists in
v2017.01-smarct4x
and in
30 other branches
integrator: switch to DM serial port
This switches the Integrator boards over to using the device model for its serial ports. Cc: Masahiro Yamada <yamada.masahiro@socionext.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Showing 6 changed files with 28 additions and 20 deletions Side-by-side Diff
arch/arm/Kconfig
arch/arm/mach-integrator/Kconfig
board/armltd/integrator/integrator.c
... | ... | @@ -20,10 +20,28 @@ |
20 | 20 | #include <common.h> |
21 | 21 | #include <netdev.h> |
22 | 22 | #include <asm/io.h> |
23 | +#include <dm/platdata.h> | |
24 | +#include <dm/platform_data/serial_pl01x.h> | |
23 | 25 | #include "arm-ebi.h" |
24 | 26 | #include "integrator-sc.h" |
25 | 27 | |
26 | 28 | DECLARE_GLOBAL_DATA_PTR; |
29 | + | |
30 | +static const struct pl01x_serial_platdata serial_platdata = { | |
31 | + .base = 0x16000000, | |
32 | +#ifdef CONFIG_ARCH_CINTEGRATOR | |
33 | + .type = TYPE_PL011, | |
34 | + .clock = 14745600, | |
35 | +#else | |
36 | + .type = TYPE_PL010, | |
37 | + .clock = 0, /* Not used for PL010 */ | |
38 | +#endif | |
39 | +}; | |
40 | + | |
41 | +U_BOOT_DEVICE(integrator_serials) = { | |
42 | + .name = "serial_pl01x", | |
43 | + .platdata = &serial_platdata, | |
44 | +}; | |
27 | 45 | |
28 | 46 | void peripheral_power_enable (void); |
29 | 47 |
include/configs/integrator-common.h
... | ... | @@ -20,6 +20,11 @@ |
20 | 20 | #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE /* Boot Argument Buffer Size*/ |
21 | 21 | #define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + 128*1024) /* Size of malloc() pool */ |
22 | 22 | |
23 | +/* Serial port PL010/PL011 through the device model */ | |
24 | +#define CONFIG_PL01X_SERIAL | |
25 | +#define CONFIG_BAUDRATE 38400 | |
26 | +#define CONFIG_CONS_INDEX 0 | |
27 | + | |
23 | 28 | #define CONFIG_CMDLINE_TAG /* enable passing of ATAGs */ |
24 | 29 | #define CONFIG_SETUP_MEMORY_TAGS |
25 | 30 | #define CONFIG_OF_LIBFDT /* enable passing a Device Tree */ |
include/configs/integratorap.h
... | ... | @@ -21,17 +21,6 @@ |
21 | 21 | #define CONFIG_SYS_HZ_CLOCK 24000000 /* Timer 1 is clocked at 24Mhz */ |
22 | 22 | |
23 | 23 | /* |
24 | - * PL010 Configuration | |
25 | - */ | |
26 | -#define CONFIG_PL010_SERIAL | |
27 | -#define CONFIG_CONS_INDEX 0 | |
28 | -#define CONFIG_BAUDRATE 38400 | |
29 | -#define CONFIG_PL01x_PORTS { (void *) (CONFIG_SYS_SERIAL0), (void *) (CONFIG_SYS_SERIAL1) } | |
30 | -#define CONFIG_SYS_SERIAL0 0x16000000 | |
31 | -#define CONFIG_SYS_SERIAL1 0x17000000 | |
32 | - | |
33 | - | |
34 | -/* | |
35 | 24 | * BOOTP options |
36 | 25 | */ |
37 | 26 | #define CONFIG_BOOTP_BOOTFILESIZE |
include/configs/integratorcp.h
... | ... | @@ -28,15 +28,6 @@ |
28 | 28 | #define CONFIG_SMC91111_BASE 0xC8000000 |
29 | 29 | #undef CONFIG_SMC91111_EXT_PHY |
30 | 30 | |
31 | -/* PL011 configuration */ | |
32 | -#define CONFIG_PL011_SERIAL | |
33 | -#define CONFIG_PL011_CLOCK 14745600 | |
34 | -#define CONFIG_PL01x_PORTS { (void *)CONFIG_SYS_SERIAL0, (void *)CONFIG_SYS_SERIAL1 } | |
35 | -#define CONFIG_CONS_INDEX 0 | |
36 | -#define CONFIG_BAUDRATE 38400 | |
37 | -#define CONFIG_SYS_SERIAL0 0x16000000 | |
38 | -#define CONFIG_SYS_SERIAL1 0x17000000 | |
39 | - | |
40 | 31 | /* |
41 | 32 | * Command line configuration. |
42 | 33 | */ |