* [U-Boot] [PATCH 2/2] integrator: switch to DM serial port
@ 2015-04-21 13:36 Linus Walleij
2015-04-21 22:35 ` Simon Glass
0 siblings, 1 reply; 4+ messages in thread
From: Linus Walleij @ 2015-04-21 13:36 UTC (permalink / raw)
To: u-boot
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>
---
board/armltd/integrator/integrator.c | 18 ++++++++++++++++++
include/configs/integrator-common.h | 8 ++++++++
include/configs/integratorap.h | 11 -----------
include/configs/integratorcp.h | 9 ---------
4 files changed, 26 insertions(+), 20 deletions(-)
diff --git a/board/armltd/integrator/integrator.c b/board/armltd/integrator/integrator.c
index e94ac850c751..cbe706170d0f 100644
--- a/board/armltd/integrator/integrator.c
+++ b/board/armltd/integrator/integrator.c
@@ -20,11 +20,29 @@
#include <common.h>
#include <netdev.h>
#include <asm/io.h>
+#include <dm/platdata.h>
+#include <dm/platform_data/serial_pl01x.h>
#include "arm-ebi.h"
#include "integrator-sc.h"
DECLARE_GLOBAL_DATA_PTR;
+static const struct pl01x_serial_platdata serial_platdata = {
+ .base = 0x16000000,
+#ifdef CONFIG_ARCH_CINTEGRATOR
+ .type = TYPE_PL011,
+ .clock = 14745600,
+#else
+ .type = TYPE_PL010,
+ .clock = 0, /* Not used for PL010 */
+#endif
+};
+
+U_BOOT_DEVICE(integrator_serials) = {
+ .name = "serial_pl01x",
+ .platdata = &serial_platdata,
+};
+
void peripheral_power_enable (void);
#if defined(CONFIG_SHOW_BOOT_PROGRESS)
diff --git a/include/configs/integrator-common.h b/include/configs/integrator-common.h
index 4362925ae1e1..13ee580c91bd 100644
--- a/include/configs/integrator-common.h
+++ b/include/configs/integrator-common.h
@@ -21,6 +21,14 @@
#define CONFIG_SYS_MAXARGS 16 /* max number of command args */
#define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE /* Boot Argument Buffer Size*/
#define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + 128*1024) /* Size of malloc() pool */
+#define CONFIG_SYS_MALLOC_F_LEN 0x2000
+
+/* Serial port PL010/PL011 through the device model */
+#define CONFIG_DM
+#define CONFIG_DM_SERIAL
+#define CONFIG_PL01X_SERIAL
+#define CONFIG_BAUDRATE 38400
+#define CONFIG_CONS_INDEX 0
#define CONFIG_CMDLINE_TAG /* enable passing of ATAGs */
#define CONFIG_SETUP_MEMORY_TAGS
diff --git a/include/configs/integratorap.h b/include/configs/integratorap.h
index e168c8c9ba57..567fd361bd69 100644
--- a/include/configs/integratorap.h
+++ b/include/configs/integratorap.h
@@ -22,17 +22,6 @@
#define CONFIG_SYS_HZ_CLOCK 24000000 /* Timer 1 is clocked at 24Mhz */
/*
- * PL010 Configuration
- */
-#define CONFIG_PL010_SERIAL
-#define CONFIG_CONS_INDEX 0
-#define CONFIG_BAUDRATE 38400
-#define CONFIG_PL01x_PORTS { (void *) (CONFIG_SYS_SERIAL0), (void *) (CONFIG_SYS_SERIAL1) }
-#define CONFIG_SYS_SERIAL0 0x16000000
-#define CONFIG_SYS_SERIAL1 0x17000000
-
-
-/*
* BOOTP options
*/
#define CONFIG_BOOTP_BOOTFILESIZE
diff --git a/include/configs/integratorcp.h b/include/configs/integratorcp.h
index 7c1ef2483ea2..7727b4e08eef 100644
--- a/include/configs/integratorcp.h
+++ b/include/configs/integratorcp.h
@@ -29,15 +29,6 @@
#define CONFIG_SMC91111_BASE 0xC8000000
#undef CONFIG_SMC91111_EXT_PHY
-/* PL011 configuration */
-#define CONFIG_PL011_SERIAL
-#define CONFIG_PL011_CLOCK 14745600
-#define CONFIG_PL01x_PORTS { (void *)CONFIG_SYS_SERIAL0, (void *)CONFIG_SYS_SERIAL1 }
-#define CONFIG_CONS_INDEX 0
-#define CONFIG_BAUDRATE 38400
-#define CONFIG_SYS_SERIAL0 0x16000000
-#define CONFIG_SYS_SERIAL1 0x17000000
-
/*
* Command line configuration.
*/
--
1.9.3
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [U-Boot] [PATCH 2/2] integrator: switch to DM serial port
2015-04-21 13:36 [U-Boot] [PATCH 2/2] integrator: switch to DM serial port Linus Walleij
@ 2015-04-21 22:35 ` Simon Glass
2015-04-22 13:17 ` Linus Walleij
0 siblings, 1 reply; 4+ messages in thread
From: Simon Glass @ 2015-04-21 22:35 UTC (permalink / raw)
To: u-boot
Hi Linus,
On 21 April 2015 at 07:36, Linus Walleij <linus.walleij@linaro.org> wrote:
> 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>
> ---
> board/armltd/integrator/integrator.c | 18 ++++++++++++++++++
> include/configs/integrator-common.h | 8 ++++++++
> include/configs/integratorap.h | 11 -----------
> include/configs/integratorcp.h | 9 ---------
> 4 files changed, 26 insertions(+), 20 deletions(-)
>
> diff --git a/board/armltd/integrator/integrator.c b/board/armltd/integrator/integrator.c
> index e94ac850c751..cbe706170d0f 100644
> --- a/board/armltd/integrator/integrator.c
> +++ b/board/armltd/integrator/integrator.c
> @@ -20,11 +20,29 @@
> #include <common.h>
> #include <netdev.h>
> #include <asm/io.h>
> +#include <dm/platdata.h>
> +#include <dm/platform_data/serial_pl01x.h>
> #include "arm-ebi.h"
> #include "integrator-sc.h"
>
> DECLARE_GLOBAL_DATA_PTR;
>
> +static const struct pl01x_serial_platdata serial_platdata = {
> + .base = 0x16000000,
> +#ifdef CONFIG_ARCH_CINTEGRATOR
> + .type = TYPE_PL011,
> + .clock = 14745600,
> +#else
> + .type = TYPE_PL010,
> + .clock = 0, /* Not used for PL010 */
> +#endif
> +};
> +
> +U_BOOT_DEVICE(integrator_serials) = {
> + .name = "serial_pl01x",
> + .platdata = &serial_platdata,
> +};
> +
> void peripheral_power_enable (void);
>
> #if defined(CONFIG_SHOW_BOOT_PROGRESS)
> diff --git a/include/configs/integrator-common.h b/include/configs/integrator-common.h
> index 4362925ae1e1..13ee580c91bd 100644
> --- a/include/configs/integrator-common.h
> +++ b/include/configs/integrator-common.h
> @@ -21,6 +21,14 @@
> #define CONFIG_SYS_MAXARGS 16 /* max number of command args */
> #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE /* Boot Argument Buffer Size*/
> #define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + 128*1024) /* Size of malloc() pool */
> +#define CONFIG_SYS_MALLOC_F_LEN 0x2000
This should be in your defconfig file, as it is defined in Kconfig now.
> +
> +/* Serial port PL010/PL011 through the device model */
> +#define CONFIG_DM
> +#define CONFIG_DM_SERIAL
And those two also.
> +#define CONFIG_PL01X_SERIAL
> +#define CONFIG_BAUDRATE 38400
> +#define CONFIG_CONS_INDEX 0
>
> #define CONFIG_CMDLINE_TAG /* enable passing of ATAGs */
> #define CONFIG_SETUP_MEMORY_TAGS
> diff --git a/include/configs/integratorap.h b/include/configs/integratorap.h
> index e168c8c9ba57..567fd361bd69 100644
> --- a/include/configs/integratorap.h
> +++ b/include/configs/integratorap.h
> @@ -22,17 +22,6 @@
> #define CONFIG_SYS_HZ_CLOCK 24000000 /* Timer 1 is clocked at 24Mhz */
>
> /*
> - * PL010 Configuration
> - */
> -#define CONFIG_PL010_SERIAL
> -#define CONFIG_CONS_INDEX 0
> -#define CONFIG_BAUDRATE 38400
> -#define CONFIG_PL01x_PORTS { (void *) (CONFIG_SYS_SERIAL0), (void *) (CONFIG_SYS_SERIAL1) }
> -#define CONFIG_SYS_SERIAL0 0x16000000
> -#define CONFIG_SYS_SERIAL1 0x17000000
> -
> -
> -/*
> * BOOTP options
> */
> #define CONFIG_BOOTP_BOOTFILESIZE
> diff --git a/include/configs/integratorcp.h b/include/configs/integratorcp.h
> index 7c1ef2483ea2..7727b4e08eef 100644
> --- a/include/configs/integratorcp.h
> +++ b/include/configs/integratorcp.h
> @@ -29,15 +29,6 @@
> #define CONFIG_SMC91111_BASE 0xC8000000
> #undef CONFIG_SMC91111_EXT_PHY
>
> -/* PL011 configuration */
> -#define CONFIG_PL011_SERIAL
> -#define CONFIG_PL011_CLOCK 14745600
> -#define CONFIG_PL01x_PORTS { (void *)CONFIG_SYS_SERIAL0, (void *)CONFIG_SYS_SERIAL1 }
> -#define CONFIG_CONS_INDEX 0
> -#define CONFIG_BAUDRATE 38400
> -#define CONFIG_SYS_SERIAL0 0x16000000
> -#define CONFIG_SYS_SERIAL1 0x17000000
> -
> /*
> * Command line configuration.
> */
> --
> 1.9.3
>
Regards,
Simon
^ permalink raw reply [flat|nested] 4+ messages in thread
* [U-Boot] [PATCH 2/2] integrator: switch to DM serial port
2015-04-21 22:35 ` Simon Glass
@ 2015-04-22 13:17 ` Linus Walleij
2015-04-22 15:05 ` Tom Rini
0 siblings, 1 reply; 4+ messages in thread
From: Linus Walleij @ 2015-04-22 13:17 UTC (permalink / raw)
To: u-boot
On Wed, Apr 22, 2015 at 12:35 AM, Simon Glass <sjg@chromium.org> wrote:
> On 21 April 2015 at 07:36, Linus Walleij <linus.walleij@linaro.org> wrote:
>> 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>
(...)
>> +#define CONFIG_SYS_MALLOC_F_LEN 0x2000
>
> This should be in your defconfig file, as it is defined in Kconfig now.
>
>> +
>> +/* Serial port PL010/PL011 through the device model */
>> +#define CONFIG_DM
>> +#define CONFIG_DM_SERIAL
>
> And those two also.
OK true ... Tom can you merge Masahiro's Kconfig patches
first as those switch around in the defconfigs a bit, so I have a
clean mergebase for this DM work?
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 4+ messages in thread
* [U-Boot] [PATCH 2/2] integrator: switch to DM serial port
2015-04-22 13:17 ` Linus Walleij
@ 2015-04-22 15:05 ` Tom Rini
0 siblings, 0 replies; 4+ messages in thread
From: Tom Rini @ 2015-04-22 15:05 UTC (permalink / raw)
To: u-boot
On Wed, Apr 22, 2015 at 03:17:03PM +0200, Linus Walleij wrote:
> On Wed, Apr 22, 2015 at 12:35 AM, Simon Glass <sjg@chromium.org> wrote:
> > On 21 April 2015 at 07:36, Linus Walleij <linus.walleij@linaro.org> wrote:
> >> 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>
> (...)
> >> +#define CONFIG_SYS_MALLOC_F_LEN 0x2000
> >
> > This should be in your defconfig file, as it is defined in Kconfig now.
> >
> >> +
> >> +/* Serial port PL010/PL011 through the device model */
> >> +#define CONFIG_DM
> >> +#define CONFIG_DM_SERIAL
> >
> > And those two also.
>
> OK true ... Tom can you merge Masahiro's Kconfig patches
> first as those switch around in the defconfigs a bit, so I have a
> clean mergebase for this DM work?
OK, will do.
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150422/bc089214/attachment.sig>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-04-22 15:05 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-21 13:36 [U-Boot] [PATCH 2/2] integrator: switch to DM serial port Linus Walleij
2015-04-21 22:35 ` Simon Glass
2015-04-22 13:17 ` Linus Walleij
2015-04-22 15:05 ` Tom Rini
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.