summaryrefslogtreecommitdiff
path: root/drivers/serial
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2018-01-27 14:50:52 -0500
committerTom Rini <trini@konsulko.com>2018-01-27 18:25:00 -0500
commit9c486e7cb03787016d2d5a360c5a62296bf5ca7b (patch)
tree91d4c793ce20201daa3be58c6ebc54e3d05e770d /drivers/serial
parentf95a4b3a5518818c831f1136053f9b2366018d0b (diff)
parent789edf694c63a6eff1188b3672af7d0228a1a0d9 (diff)
downloadu-boot-9c486e7cb03787016d2d5a360c5a62296bf5ca7b.tar.gz
Merge branch 'rmobile-mx' of git://git.denx.de/u-boot-sh
Diffstat (limited to 'drivers/serial')
-rw-r--r--drivers/serial/serial_sh.c4
-rw-r--r--drivers/serial/serial_sh.h14
2 files changed, 7 insertions, 11 deletions
diff --git a/drivers/serial/serial_sh.c b/drivers/serial/serial_sh.c
index d9db702803..c07ddc70dc 100644
--- a/drivers/serial/serial_sh.c
+++ b/drivers/serial/serial_sh.c
@@ -219,8 +219,8 @@ static int sh_serial_ofdata_to_platdata(struct udevice *dev)
fdt_addr_t addr;
int ret;
- addr = fdtdec_get_addr(gd->fdt_blob, dev_of_offset(dev), "reg");
- if (addr == FDT_ADDR_T_NONE)
+ addr = devfdt_get_addr(dev);
+ if (!addr)
return -EINVAL;
plat->base = addr;
diff --git a/drivers/serial/serial_sh.h b/drivers/serial/serial_sh.h
index 1b8d742f1c..deb4b647c6 100644
--- a/drivers/serial/serial_sh.h
+++ b/drivers/serial/serial_sh.h
@@ -224,9 +224,8 @@ struct uart_port {
# define SCSPTR3 0xffc60020 /* 16 bit SCIF */
# define SCIF_ORER 0x0001 /* Overrun error bit */
# define SCSCR_INIT(port) 0x38 /* TIE=0,RIE=0,TE=1,RE=1,REIE=1 */
-#elif defined(CONFIG_R8A7790) || defined(CONFIG_R8A7791) || \
- defined(CONFIG_R8A7792) || defined(CONFIG_R8A7793) || \
- defined(CONFIG_R8A7794) || defined(CONFIG_RCAR_GEN3)
+#elif defined(CONFIG_RCAR_GEN2) || defined(CONFIG_RCAR_GEN3) || \
+ defined(CONFIG_R7S72100)
# if defined(CONFIG_SCIF_A)
# define SCIF_ORER 0x0200
# else
@@ -308,8 +307,7 @@ struct uart_port {
/* SH7763 SCIF2 support */
# define SCIF2_RFDC_MASK 0x001f
# define SCIF2_TXROOM_MAX 16
-#elif defined(CONFIG_R8A7790) || defined(CONFIG_R8A7791) || defined(CONFIG_R8A7792) || \
- defined(CONFIG_R8A7793) || defined(CONFIG_R8A7794)
+#elif defined(CONFIG_RCAR_GEN2)
# define SCIF_ERRORS (SCIF_PER | SCIF_FER | SCIF_ER | SCIF_BRK)
# if defined(CONFIG_SCIF_A)
# define SCIF_RFDC_MASK 0x007f
@@ -566,8 +564,7 @@ SCIF_FNS(SCFCR, 0x18, 16)
SCIF_FNS(SCFDR, 0x1c, 16)
SCIF_FNS(SCLSR, 0x24, 16)
SCIF_FNS(DL, 0x00, 0) /* dummy */
-#elif defined(CONFIG_R8A7790) || defined(CONFIG_R8A7791) || defined(CONFIG_R8A7792) || \
- defined(CONFIG_R8A7793) || defined(CONFIG_R8A7794)
+#elif defined(CONFIG_RCAR_GEN2)
/* SCIFA and SCIF register offsets and size */
SCIx_FNS(SCSMR, 0, 0, 0x00, 16, 0, 0, 0x00, 16, 0, 0)
SCIx_FNS(SCBRR, 0, 0, 0x04, 8, 0, 0, 0x04, 8, 0, 0)
@@ -762,8 +759,7 @@ static inline int scbrr_calc(struct uart_port *port, int bps, int clk)
#define SCBRR_VALUE(bps, clk) scbrr_calc(port, bps, clk)
#elif defined(__H8300H__) || defined(__H8300S__)
#define SCBRR_VALUE(bps, clk) (((clk*1000/32)/bps)-1)
-#elif defined(CONFIG_R8A7790) || defined(CONFIG_R8A7791) || defined(CONFIG_R8A7792) || \
- defined(CONFIG_R8A7793) || defined(CONFIG_R8A7794)
+#elif defined(CONFIG_RCAR_GEN2)
#define DL_VALUE(bps, clk) (clk / bps / 16) /* External Clock */
#if defined(CONFIG_SCIF_A)
#define SCBRR_VALUE(bps, clk) (clk / bps / 16 - 1) /* Internal Clock */