ath79: spi: Remove the explicit pinctrl setting
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH 1/4 ath79: spi: Remove the explicit pinctrl setting
The correct pinctrl is handled automatically so we don't need to do it in the driver.
---
drivers/spi/ath79_spi.c | 12 ------------ 1 file changed, 12 deletions(-)
drivers/spi/ath79_spi.c +0 -12
@@ -175,19 +175,7 @@ static int ath79_spi_set_mode(struct udevice *bus, uint mode)static int ath79_spi_probe (struct udevice *bus) {struct ath79_spi_priv *priv =dev_get_priv (bus); -struct udevice *pinctrl;fdt_addr_t addr; -int ret; - - ret =uclass_get_device (UCLASS_PINCTRL ,0 , &pinctrl); -if (ret) -return ret; - ret =pinctrl_get_periph_id (pinctrl, bus); -if (ret <0 ) -return ret; - ret =pinctrl_request (pinctrl, ret,0 ); -if (ret <0 ) -return ret; addr =dev_get_addr (bus);if (addr ==FDT_ADDR_T_NONE )
Signature · 1 line
1.9.1
PATCH 1/4 ath79: spi: Remove the explicit pinctrl setting
Quoted 8 lines · Wills Wang
The correct pinctrl is handled automatically so we don't need to do it in the driver.
Signed-off-by Wills Wang <[email protected]>---
drivers/spi/ath79_spi.c | 12 ------------ 1 file changed, 12 deletions(-)
PATCH 2/4 ar933x: serial: Remove the explicit pinctrl setting
In reply to a message not in the archiveThe correct pinctrl is handled automatically so we don't need to do it in the driver.
---
drivers/serial/serial_ar933x.c | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-)
drivers/serial/serial_ar933x.c +2 -14
@@ -38,6 +38,7 @@ struct ar933x_serial_priv { };/* +* Baudrate algorithm come from Linux/drivers/tty/serial/ar933x_uart.c * baudrate = (clk / (scale + 1)) * (step * (1 / 2^17)) */ static u32 ar933x_serial_get_baud (u32 clk,u32 scale,u32 step)
@@ -145,27 +146,14 @@ static int ar933x_serial_pending(struct udevice *dev, bool input)static int ar933x_serial_probe (struct udevice *dev) {struct ar933x_serial_priv *priv =dev_get_priv (dev); -struct udevice *pinctrl;fdt_addr_t addr;u32 val; -int ret; - - ret =uclass_get_device (UCLASS_PINCTRL ,0 , &pinctrl); -if (ret) -return ret; - ret =pinctrl_get_periph_id (pinctrl, dev); -if (ret <0 ) -return ret; - ret =pinctrl_request (pinctrl, ret,0 ); -if (ret <0 ) -return ret; addr =dev_get_addr (dev);if (addr ==FDT_ADDR_T_NONE )return -EINVAL ; - priv->regs =map_physmem (addr, -AR933X_UART_SIZE , + priv->regs =map_physmem (addr,AR933X_UART_SIZE ,MAP_NOCACHE );/*
Signature · 1 line
1.9.1
PATCH 2/4 ar933x: serial: Remove the explicit pinctrl setting
Quoted 8 lines · Wills Wang
The correct pinctrl is handled automatically so we don't need to do it in the driver.
Signed-off-by Wills Wang <[email protected]>---
drivers/serial/serial_ar933x.c | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-)
PATCH 3/4 ath79: ar933x: use BIT macro for bit shift operation
In reply to a message not in the archiveused a uniform BIT macro for register bit-field shift
---
arch/mips/mach-ath79/ar933x/ddr.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-)
arch/mips/mach-ath79/ar933x/ddr.c +7 -7
@@ -21,7 +21,7 @@ DECLARE_GLOBAL_DATA_PTR;#define DDR_CTRL_UPD_EMRS BIT(1)#define DDR_CTRL_UPD_MRS BIT(0) -#define DDR_REFRESH_EN (1 << 14) +#define DDR_REFRESH_EN BIT(14)#define DDR_REFRESH_M 0x3ff#define DDR_REFRESH (x) ((x) & 0x3ff)#define DDR_REFRESH_VAL_25M (DDR_REFRESH_EN | DDR_REFRESH(390))
@@ -48,7 +48,7 @@ DECLARE_GLOBAL_DATA_PTR;#define DDR_CAS_L_M 0x17#define DDR_CAS_L_S 27#define DDR_CAS_L (x) (((x) & DDR_CAS_L_M) << DDR_CAS_L_S) -#define DDR_OPEN (1 << 30) +#define DDR_OPEN BIT(30)#define DDR_CONF_REG_VAL (DDR_TRAS(16) | DDR_TRCD(6) | \ DDR_TRP(6) | DDR_TRRD(4) | \ DDR_TRFC(30) | DDR_TMRD(15) | \
@@ -57,10 +57,10 @@ DECLARE_GLOBAL_DATA_PTR;#define DDR_BURST_LEN_S 0#define DDR_BURST_LEN_M 0xf#define DDR_BURST_LEN (x) ((x) << DDR_BURST_LEN_S) -#define DDR_BURST_TYPE (1 << 4) -#define DDR_CNTL_OE_EN (1 << 5) -#define DDR_PHASE_SEL (1 << 6) -#define DDR_CKE (1 << 7) +#define DDR_BURST_TYPE BIT(4) +#define DDR_CNTL_OE_EN BIT(5) +#define DDR_PHASE_SEL BIT(6) +#define DDR_CKE BIT(7)#define DDR_TWR_S 8#define DDR_TWR_M 0xf#define DDR_TWR (x) ((x) << DDR_TWR_S)
@@ -76,7 +76,7 @@ DECLARE_GLOBAL_DATA_PTR;#define DDR_G_OPEN_L_S 26#define DDR_G_OPEN_L_M 0xf#define DDR_G_OPEN_L (x) ((x) << DDR_G_OPEN_L_S) -#define DDR_HALF_WIDTH_LOW (1 << 31) +#define DDR_HALF_WIDTH_LOW BIT(31)#define DDR_CONF2_REG_VAL (DDR_BURST_LEN(8) | DDR_CNTL_OE_EN | \ DDR_CKE | DDR_TWR(6) | DDR_TRTW(14) | \ DDR_TRTP(8) | DDR_TWTR(14) | \
Signature · 1 line
1.9.1