Page MenuHomeFreeBSD

D2588.diff
No OneTemporary

D2588.diff

Index: sys/arm/amlogic/aml8726/aml8726_ccm.c
===================================================================
--- sys/arm/amlogic/aml8726/aml8726_ccm.c
+++ sys/arm/amlogic/aml8726/aml8726_ccm.c
@@ -185,7 +185,6 @@
device_printf(dev, "unsupported SoC\n");
return (ENXIO);
/* NOTREACHED */
- break;
}
if (bus_alloc_resources(dev, aml8726_ccm_spec, sc->res)) {
Index: sys/arm/amlogic/aml8726/aml8726_pinctrl.c
===================================================================
--- sys/arm/amlogic/aml8726/aml8726_pinctrl.c
+++ sys/arm/amlogic/aml8726/aml8726_pinctrl.c
@@ -146,7 +146,6 @@
device_printf(dev, "unsupported SoC\n");
return (ENXIO);
/* NOTREACHED */
- break;
}
if (bus_alloc_resources(dev, aml8726_pinctrl_spec, sc->res)) {
Index: sys/arm/amlogic/aml8726/aml8726_rtc.c
===================================================================
--- sys/arm/amlogic/aml8726/aml8726_rtc.c
+++ sys/arm/amlogic/aml8726/aml8726_rtc.c
@@ -51,6 +51,8 @@
#include <dev/ofw/ofw_bus.h>
#include <dev/ofw/ofw_bus_subr.h>
+#include <arm/amlogic/aml8726/aml8726_soc.h>
+
#include "clock_if.h"
/*
@@ -372,45 +374,28 @@
aml8726_rtc_attach(device_t dev)
{
struct aml8726_rtc_softc *sc = device_get_softc(dev);
- boolean_t init_always_valid;
- char *init_always;
- pcell_t prop;
- phandle_t node;
- ssize_t len;
sc->dev = dev;
- node = ofw_bus_get_node(dev);
-
- len = OF_getprop_alloc(node, "init-always",
- sizeof(char), (void **)&init_always);
- sc->init.always = FALSE;
- init_always_valid = FALSE;
- if (len > 0) {
- if (strncmp(init_always, "true", len) == 0) {
- sc->init.always = TRUE;
- init_always_valid = TRUE;
- } else if (strncmp(init_always, "false", len) == 0)
- init_always_valid = TRUE;
- free(init_always, M_OFWPROP);
- }
- if (init_always_valid == FALSE) {
- device_printf(dev, "missing init-always attribute in FDT\n");
+ switch (aml8726_soc_hw_rev) {
+ case AML_SOC_HW_REV_M3:
+ sc->init.always = true;
+ sc->init.xo = 0x3c0a;
+ sc->init.gpo = 0x100000;
+ break;
+ case AML_SOC_HW_REV_M6:
+ case AML_SOC_HW_REV_M8:
+ case AML_SOC_HW_REV_M8B:
+ sc->init.always = false;
+ sc->init.xo = 0x180a;
+ sc->init.gpo = 0x500000;
+ break;
+ default:
+ device_printf(dev, "unsupported SoC\n");
return (ENXIO);
+ /* NOTREACHED */
}
- if (OF_getencprop(node, "xo-init", &prop, sizeof(prop)) <= 0) {
- device_printf(dev, "missing xo-init attribute in FDT\n");
- return (ENXIO);
- }
- sc->init.xo = prop;
-
- if (OF_getencprop(node, "gpo-init", &prop, sizeof(prop)) <= 0) {
- device_printf(dev, "missing gpo-init attribute in FDT\n");
- return (ENXIO);
- }
- sc->init.gpo = prop;
-
if (bus_alloc_resources(dev, aml8726_rtc_spec, sc->res)) {
device_printf(dev, "can not allocate resources for device\n");
return (ENXIO);
Index: sys/arm/amlogic/aml8726/aml8726_sdxc-m8.c
===================================================================
--- sys/arm/amlogic/aml8726/aml8726_sdxc-m8.c
+++ sys/arm/amlogic/aml8726/aml8726_sdxc-m8.c
@@ -758,7 +758,6 @@
device_printf(dev, "unsupported SoC\n");
return (ENXIO);
/* NOTREACHED */
- break;
}
node = ofw_bus_get_node(dev);
Index: sys/boot/fdt/dts/arm/odroidc1.dts
===================================================================
--- sys/boot/fdt/dts/arm/odroidc1.dts
+++ sys/boot/fdt/dts/arm/odroidc1.dts
@@ -194,10 +194,6 @@
compatible = "amlogic,aml8726-rtc";
reg = <0xc8100740 20>; /* aobus 0x1d0 */
interrupts = <0 72 1>;
-
- init-always = "false";
- xo-init = <0x180a>;
- gpo-init = <0x500000>;
};
clkmsr: clkmsr@c1108758 {
Index: sys/boot/fdt/dts/arm/vsatv102-m6.dts
===================================================================
--- sys/boot/fdt/dts/arm/vsatv102-m6.dts
+++ sys/boot/fdt/dts/arm/vsatv102-m6.dts
@@ -153,10 +153,6 @@
compatible = "amlogic,aml8726-rtc";
reg = <0xda004340 20>; /* secbus2 0xd0 */
interrupts = <0 72 1>; /* AM_IRQ2(8) */
-
- init-always = "false";
- xo-init = <0x180a>;
- gpo-init = <0x500000>;
};
clkmsr: clkmsr@c1108758 {

File Metadata

Mime Type
text/plain
Expires
Wed, Dec 25, 7:15 PM (9 h, 56 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15598113
Default Alt Text
D2588.diff (3 KB)

Event Timeline