Commit aa5f2af5 authored by Linus Walleij's avatar Linus Walleij
Browse files

Merge tag 'sh-pfc-for-v5.5-tag2' of...

Merge tag 'sh-pfc-for-v5.5-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers into devel

pinctrl: sh-pfc: Updates for v5.5 (take two)

  - Add support for the new R-Car M3-W+ (r8a77961) SoC,
  - Small fixes and cleanups.
parents 66ee1973 884caada
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -28,7 +28,8 @@ Required Properties:
    - "renesas,pfc-r8a7793": for R8A7793 (R-Car M2-N) compatible pin-controller.
    - "renesas,pfc-r8a7794": for R8A7794 (R-Car E2) compatible pin-controller.
    - "renesas,pfc-r8a7795": for R8A7795 (R-Car H3) compatible pin-controller.
    - "renesas,pfc-r8a7796": for R8A7796 (R-Car M3-W) compatible pin-controller.
    - "renesas,pfc-r8a7796": for R8A77960 (R-Car M3-W) compatible pin-controller.
    - "renesas,pfc-r8a77961": for R8A77961 (R-Car M3-W+) compatible pin-controller.
    - "renesas,pfc-r8a77965": for R8A77965 (R-Car M3-N) compatible pin-controller.
    - "renesas,pfc-r8a77970": for R8A77970 (R-Car V3M) compatible pin-controller.
    - "renesas,pfc-r8a77980": for R8A77980 (R-Car V3H) compatible pin-controller.
+1 −1
Original line number Diff line number Diff line
@@ -134,7 +134,7 @@ enum {
	GPIO_FN_EX_WAIT1, GPIO_FN_SD1_DAT0_A, GPIO_FN_DREQ2, GPIO_FN_CAN1_TX_C,
		GPIO_FN_ET0_LINK_C, GPIO_FN_ET0_ETXD5_A,
	GPIO_FN_EX_WAIT0, GPIO_FN_TCLK1_B,
	GPIO_FN_RD_WR, GPIO_FN_TCLK0,
	GPIO_FN_RD_WR, GPIO_FN_TCLK0, GPIO_FN_CAN_CLK_B, GPIO_FN_ET0_ETXD4,
	GPIO_FN_EX_CS5, GPIO_FN_SD1_CMD_A, GPIO_FN_ATADIR, GPIO_FN_QSSL_B,
		GPIO_FN_ET0_ETXD3_A,
	GPIO_FN_EX_CS4, GPIO_FN_SD1_WP_A, GPIO_FN_ATAWR, GPIO_FN_QMI_QIO1_B,
+6 −2
Original line number Diff line number Diff line
@@ -27,7 +27,8 @@ config PINCTRL_SH_PFC
	select PINCTRL_PFC_R8A7793 if ARCH_R8A7793
	select PINCTRL_PFC_R8A7794 if ARCH_R8A7794
	select PINCTRL_PFC_R8A7795 if ARCH_R8A7795
	select PINCTRL_PFC_R8A7796 if ARCH_R8A7796
	select PINCTRL_PFC_R8A77960 if ARCH_R8A77960 || ARCH_R8A7796
	select PINCTRL_PFC_R8A77961 if ARCH_R8A77961
	select PINCTRL_PFC_R8A77965 if ARCH_R8A77965
	select PINCTRL_PFC_R8A77970 if ARCH_R8A77970
	select PINCTRL_PFC_R8A77980 if ARCH_R8A77980
@@ -117,9 +118,12 @@ config PINCTRL_PFC_R8A7794
config PINCTRL_PFC_R8A7795
	bool "R-Car H3 pin control support" if COMPILE_TEST

config PINCTRL_PFC_R8A7796
config PINCTRL_PFC_R8A77960
	bool "R-Car M3-W pin control support" if COMPILE_TEST

config PINCTRL_PFC_R8A77961
	bool "R-Car M3-W+ pin control support" if COMPILE_TEST

config PINCTRL_PFC_R8A77965
	bool "R-Car M3-N pin control support" if COMPILE_TEST

+2 −1
Original line number Diff line number Diff line
@@ -20,7 +20,8 @@ obj-$(CONFIG_PINCTRL_PFC_R8A7793) += pfc-r8a7791.o
obj-$(CONFIG_PINCTRL_PFC_R8A7794)	+= pfc-r8a7794.o
obj-$(CONFIG_PINCTRL_PFC_R8A7795)	+= pfc-r8a7795.o
obj-$(CONFIG_PINCTRL_PFC_R8A7795)	+= pfc-r8a7795-es1.o
obj-$(CONFIG_PINCTRL_PFC_R8A7796)	+= pfc-r8a7796.o
obj-$(CONFIG_PINCTRL_PFC_R8A77960)	+= pfc-r8a7796.o
obj-$(CONFIG_PINCTRL_PFC_R8A77961)	+= pfc-r8a7796.o
obj-$(CONFIG_PINCTRL_PFC_R8A77965)	+= pfc-r8a77965.o
obj-$(CONFIG_PINCTRL_PFC_R8A77970)	+= pfc-r8a77970.o
obj-$(CONFIG_PINCTRL_PFC_R8A77980)	+= pfc-r8a77980.o
+14 −12
Original line number Diff line number Diff line
@@ -29,12 +29,12 @@
static int sh_pfc_map_resources(struct sh_pfc *pfc,
				struct platform_device *pdev)
{
	unsigned int num_windows, num_irqs;
	struct sh_pfc_window *windows;
	unsigned int *irqs = NULL;
	unsigned int num_windows;
	struct resource *res;
	unsigned int i;
	int irq;
	int num_irqs;

	/* Count the MEM and IRQ resources. */
	for (num_windows = 0;; num_windows++) {
@@ -42,17 +42,13 @@ static int sh_pfc_map_resources(struct sh_pfc *pfc,
		if (!res)
			break;
	}
	for (num_irqs = 0;; num_irqs++) {
		irq = platform_get_irq(pdev, num_irqs);
		if (irq == -EPROBE_DEFER)
			return irq;
		if (irq < 0)
			break;
	}

	if (num_windows == 0)
		return -EINVAL;

	num_irqs = platform_irq_count(pdev);
	if (num_irqs < 0)
		return num_irqs;

	/* Allocate memory windows and IRQs arrays. */
	windows = devm_kcalloc(pfc->dev, num_windows, sizeof(*windows),
			       GFP_KERNEL);
@@ -585,10 +581,16 @@ static const struct of_device_id sh_pfc_of_table[] = {
	},
#endif /* DEBUG */
#endif
#ifdef CONFIG_PINCTRL_PFC_R8A7796
#ifdef CONFIG_PINCTRL_PFC_R8A77960
	{
		.compatible = "renesas,pfc-r8a7796",
		.data = &r8a7796_pinmux_info,
		.data = &r8a77960_pinmux_info,
	},
#endif
#ifdef CONFIG_PINCTRL_PFC_R8A77961
	{
		.compatible = "renesas,pfc-r8a77961",
		.data = &r8a77961_pinmux_info,
	},
#endif
#ifdef CONFIG_PINCTRL_PFC_R8A77965
Loading