Revert "HACK: clk-bcm2835: Add BCM2838_CLOCK_EMMC2 support"
authorStefan Wahren <wahrenst@gmx.net>
Fri, 20 Sep 2019 05:25:38 +0000 (07:25 +0200)
committerpopcornmix <popcornmix@gmail.com>
Mon, 30 Sep 2019 12:42:43 +0000 (14:42 +0200)
This reverts commit 1ac954a8c5dd939dffd3b256be50253082297d9a
to apply the much better upstream solution afterwards.

Signed-off-by: Stefan Wahren <wahrenst@gmx.net>
arch/arm/boot/dts/bcm2838.dtsi
drivers/clk/bcm/clk-bcm2835.c
include/dt-bindings/clock/bcm2835.h

index 1d321ad..84b9419 100644 (file)
                        compatible = "brcm,bcm2711-emmc2";
                        status = "okay";
                        interrupts = <GIC_SPI 126 IRQ_TYPE_LEVEL_HIGH>;
-                       clocks = <&clocks BCM2838_CLOCK_EMMC2>;
                        reg = <0x7e340000 0x100>;
                };
 
index a885c2f..07ddfc0 100644 (file)
 #define CM_AVEODIV             0x1bc
 #define CM_EMMCCTL             0x1c0
 #define CM_EMMCDIV             0x1c4
-#define CM_EMMC2CTL            0x1d0
-#define CM_EMMC2DIV            0x1d4
 
 /* General bits for the CM_*CTL regs */
 # define CM_ENABLE                     BIT(4)
@@ -2049,15 +2047,6 @@ static const struct bcm2835_clk_desc clk_desc_array[] = {
                .frac_bits = 8,
                .tcnt_mux = 39),
 
-       /* EMMC2 clock (only available for BCM2838) */
-       [BCM2838_CLOCK_EMMC2]   = REGISTER_PER_CLK(
-               .name = "emmc2",
-               .ctl_reg = CM_EMMC2CTL,
-               .div_reg = CM_EMMC2DIV,
-               .int_bits = 4,
-               .frac_bits = 8,
-               .tcnt_mux = 42),
-
        /* General purpose (GPIO) clocks */
        [BCM2835_CLOCK_GP0]     = REGISTER_PER_CLK(
                .name = "gp0",
@@ -2287,12 +2276,8 @@ static int bcm2835_clk_probe(struct platform_device *pdev)
 
        for (i = 0; i < asize; i++) {
                desc = &clk_desc_array[i];
-               if (desc->clk_register && desc->data) {
-                       if ((i != BCM2838_CLOCK_EMMC2) ||
-                           of_device_is_compatible(fw_node, "brcm,bcm2838-cprman")) {
-                               hws[i] = desc->clk_register(cprman, desc->data);
-                       }
-               }
+               if (desc->clk_register && desc->data)
+                       hws[i] = desc->clk_register(cprman, desc->data);
        }
 
        ret = bcm2835_mark_sdc_parent_critical(hws[BCM2835_CLOCK_SDRAM]->clk);
@@ -2312,7 +2297,6 @@ static int bcm2835_clk_probe(struct platform_device *pdev)
 
 static const struct of_device_id bcm2835_clk_of_match[] = {
        { .compatible = "brcm,bcm2835-cprman", },
-       { .compatible = "brcm,bcm2838-cprman", },
        {}
 };
 MODULE_DEVICE_TABLE(of, bcm2835_clk_of_match);
index 077796e..a0c812b 100644 (file)
@@ -66,5 +66,3 @@
 #define BCM2835_CLOCK_DSI1E            48
 #define BCM2835_CLOCK_DSI0P            49
 #define BCM2835_CLOCK_DSI1P            50
-
-#define BCM2838_CLOCK_EMMC2            51