mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-03-22 07:27:12 +08:00
Merge tag 'mips_6.17' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux
Pull MIPS updates from Thomas Bogendoerfer:
- DT updates for ralink, mobileye and atheros/qualcomm
- Clean up of mc146818 usage
- Speed up delay calibration for CPS
- Other cleanups and fixes
* tag 'mips_6.17' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux: (50 commits)
MIPS: Don't use %pK through printk
MIPS: Update Joshua Kinard's e-mail address
MIPS: mobileye: dts: eyeq5,eyeq6h: rename the emmc controller
MIPS: mm: tlb-r4k: Uniquify TLB entries on init
MIPS: SGI-IP27: Delete an unnecessary check before kfree() in hub_domain_free()
mips/malta,loongson2ef: use generic mc146818_get_time function
mips: remove redundant macro mc146818_decode_year
mips/mach-rm: remove custom mc146818rtc.h file
mips: remove unused function mc146818_set_rtc_mmss
MIPS: CPS: Optimise delay CPU calibration for SMP
MIPS: CPS: Improve mips_cps_first_online_in_cluster()
MIPS: disable MMID when not supported by the hardware
MIPS: eyeq5_defconfig: add I2C subsystem, driver and temp sensor driver
MIPS: eyeq5_defconfig: add GPIO subsystem & driver
MIPS: mobileye: eyeq5: add two GPIO bank nodes
MIPS: mobileye: eyeq5: add evaluation board I2C temp sensor
MIPS: mobileye: eyeq5: add 5 I2C controller nodes
MIPS: eyeq5_defconfig: Update for v6.16-rc1
MIPS: vpe-mt: add missing prototypes for vpe_{alloc,start,stop,free}
mips: boot: use 'targets' instead of extra-y in Makefile
...
This commit is contained in:
@@ -26,18 +26,22 @@ description: |
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
items:
|
||||
- enum:
|
||||
- ralink,mt7620-sysc
|
||||
- ralink,mt7628-sysc
|
||||
- ralink,mt7688-sysc
|
||||
- ralink,rt2880-sysc
|
||||
- ralink,rt3050-sysc
|
||||
- ralink,rt3052-sysc
|
||||
- ralink,rt3352-sysc
|
||||
- ralink,rt3883-sysc
|
||||
- ralink,rt5350-sysc
|
||||
- const: syscon
|
||||
oneOf:
|
||||
- items:
|
||||
- enum:
|
||||
- ralink,mt7620-sysc
|
||||
- ralink,mt7688-sysc
|
||||
- ralink,rt2880-sysc
|
||||
- ralink,rt3050-sysc
|
||||
- ralink,rt3052-sysc
|
||||
- ralink,rt3352-sysc
|
||||
- ralink,rt3883-sysc
|
||||
- ralink,rt5350-sysc
|
||||
- const: syscon
|
||||
- items:
|
||||
- const: ralink,mt7628-sysc
|
||||
- const: ralink,mt7688-sysc
|
||||
- const: syscon
|
||||
|
||||
reg:
|
||||
maxItems: 1
|
||||
|
||||
@@ -562,6 +562,7 @@ config MIPS_MALTA
|
||||
select MIPS_L1_CACHE_SHIFT_6
|
||||
select MIPS_MSC
|
||||
select PCI_GT64XXX_PCI0
|
||||
select RTC_MC146818_LIB
|
||||
select SMP_UP if SMP
|
||||
select SWAP_IO_SPACE
|
||||
select SYS_HAS_CPU_MIPS32_R1
|
||||
@@ -1836,6 +1837,7 @@ config CPU_LOONGSON2EF
|
||||
select CPU_SUPPORTS_64BIT_KERNEL
|
||||
select CPU_SUPPORTS_HIGHMEM
|
||||
select CPU_SUPPORTS_HUGEPAGES
|
||||
select RTC_MC146818_LIB
|
||||
|
||||
config CPU_LOONGSON32
|
||||
bool
|
||||
|
||||
@@ -54,10 +54,10 @@ UIMAGE_ENTRYADDR = $(VMLINUX_ENTRY_ADDRESS)
|
||||
# Compressed vmlinux images
|
||||
#
|
||||
|
||||
extra-y += vmlinux.bin.bz2
|
||||
extra-y += vmlinux.bin.gz
|
||||
extra-y += vmlinux.bin.lzma
|
||||
extra-y += vmlinux.bin.lzo
|
||||
targets += vmlinux.bin.bz2
|
||||
targets += vmlinux.bin.gz
|
||||
targets += vmlinux.bin.lzma
|
||||
targets += vmlinux.bin.lzo
|
||||
|
||||
$(obj)/vmlinux.bin.bz2: $(obj)/vmlinux.bin FORCE
|
||||
$(call if_changed,bzip2)
|
||||
|
||||
@@ -21,3 +21,11 @@
|
||||
<0x8 0x02000000 0x0 0x7E000000>;
|
||||
};
|
||||
};
|
||||
|
||||
&i2c2 {
|
||||
temperature-sensor@48 {
|
||||
compatible = "ti,tmp112";
|
||||
reg = <0x48>;
|
||||
label = "U60";
|
||||
};
|
||||
};
|
||||
|
||||
@@ -110,6 +110,81 @@
|
||||
ranges;
|
||||
compatible = "simple-bus";
|
||||
|
||||
i2c0: i2c@300000 {
|
||||
compatible = "mobileye,eyeq5-i2c", "arm,primecell";
|
||||
reg = <0 0x300000 0x0 0x1000>;
|
||||
interrupt-parent = <&gic>;
|
||||
interrupts = <GIC_SHARED 1 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clock-frequency = <400000>; /* Fast mode */
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
clocks = <&olb 35>, <&olb EQ5C_PER_I2C>;
|
||||
clock-names = "i2cclk", "apb_pclk";
|
||||
resets = <&olb 0 13>;
|
||||
i2c-transfer-timeout-us = <10000>;
|
||||
mobileye,olb = <&olb 0>;
|
||||
};
|
||||
|
||||
i2c1: i2c@400000 {
|
||||
compatible = "mobileye,eyeq5-i2c", "arm,primecell";
|
||||
reg = <0 0x400000 0x0 0x1000>;
|
||||
interrupt-parent = <&gic>;
|
||||
interrupts = <GIC_SHARED 2 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clock-frequency = <400000>; /* Fast mode */
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
clocks = <&olb 35>, <&olb EQ5C_PER_I2C>;
|
||||
clock-names = "i2cclk", "apb_pclk";
|
||||
resets = <&olb 0 14>;
|
||||
i2c-transfer-timeout-us = <10000>;
|
||||
mobileye,olb = <&olb 1>;
|
||||
};
|
||||
|
||||
i2c2: i2c@500000 {
|
||||
compatible = "mobileye,eyeq5-i2c", "arm,primecell";
|
||||
reg = <0 0x500000 0x0 0x1000>;
|
||||
interrupt-parent = <&gic>;
|
||||
interrupts = <GIC_SHARED 3 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clock-frequency = <400000>; /* Fast mode */
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
clocks = <&olb 35>, <&olb EQ5C_PER_I2C>;
|
||||
clock-names = "i2cclk", "apb_pclk";
|
||||
resets = <&olb 0 15>;
|
||||
i2c-transfer-timeout-us = <10000>;
|
||||
mobileye,olb = <&olb 2>;
|
||||
};
|
||||
|
||||
i2c3: i2c@600000 {
|
||||
compatible = "mobileye,eyeq5-i2c", "arm,primecell";
|
||||
reg = <0 0x600000 0x0 0x1000>;
|
||||
interrupt-parent = <&gic>;
|
||||
interrupts = <GIC_SHARED 4 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clock-frequency = <400000>; /* Fast mode */
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
clocks = <&olb 35>, <&olb EQ5C_PER_I2C>;
|
||||
clock-names = "i2cclk", "apb_pclk";
|
||||
resets = <&olb 0 16>;
|
||||
i2c-transfer-timeout-us = <10000>;
|
||||
mobileye,olb = <&olb 3>;
|
||||
};
|
||||
|
||||
i2c4: i2c@700000 {
|
||||
compatible = "mobileye,eyeq5-i2c", "arm,primecell";
|
||||
reg = <0 0x700000 0x0 0x1000>;
|
||||
interrupt-parent = <&gic>;
|
||||
interrupts = <GIC_SHARED 5 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clock-frequency = <400000>; /* Fast mode */
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
clocks = <&olb 35>, <&olb EQ5C_PER_I2C>;
|
||||
clock-names = "i2cclk", "apb_pclk";
|
||||
resets = <&olb 0 17>;
|
||||
i2c-transfer-timeout-us = <10000>;
|
||||
mobileye,olb = <&olb 4>;
|
||||
};
|
||||
|
||||
uart0: serial@800000 {
|
||||
compatible = "arm,pl011", "arm,primecell";
|
||||
reg = <0 0x800000 0x0 0x1000>;
|
||||
@@ -178,6 +253,58 @@
|
||||
clocks = <&olb EQ5C_CPU_CORE0>;
|
||||
};
|
||||
};
|
||||
|
||||
emmc: mmc@2200000 {
|
||||
compatible = "mobileye,eyeq-sd4hc", "cdns,sd4hc";
|
||||
reg = <0 0x2200000 0x0 0x1000>;
|
||||
interrupt-parent = <&gic>;
|
||||
interrupts = <GIC_SHARED 10 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&olb EQ5C_PER_EMMC>;
|
||||
bus-width = <8>;
|
||||
max-frequency = <200000000>;
|
||||
mmc-ddr-1_8v;
|
||||
sd-uhs-ddr50;
|
||||
mmc-hs200-1_8v;
|
||||
mmc-hs400-1_8v;
|
||||
mmc-hs400-enhanced-strobe;
|
||||
|
||||
cdns,phy-input-delay-legacy = <4>;
|
||||
cdns,phy-input-delay-mmc-highspeed = <2>;
|
||||
cdns,phy-input-delay-mmc-ddr = <3>;
|
||||
cdns,phy-dll-delay-sdclk = <32>;
|
||||
cdns,phy-dll-delay-sdclk-hsmmc = <32>;
|
||||
cdns,phy-dll-delay-strobe = <32>;
|
||||
};
|
||||
|
||||
gpio0: gpio@1400000 {
|
||||
compatible = "mobileye,eyeq5-gpio";
|
||||
reg = <0x0 0x1400000 0x0 0x1000>;
|
||||
gpio-bank = <0>;
|
||||
ngpios = <29>;
|
||||
interrupt-parent = <&gic>;
|
||||
interrupts = <GIC_SHARED 14 IRQ_TYPE_LEVEL_HIGH>;
|
||||
gpio-controller;
|
||||
#gpio-cells = <2>;
|
||||
gpio-ranges = <&olb 0 0 29>;
|
||||
interrupt-controller;
|
||||
#interrupt-cells = <2>;
|
||||
resets = <&olb 0 26>;
|
||||
};
|
||||
|
||||
gpio1: gpio@1500000 {
|
||||
compatible = "mobileye,eyeq5-gpio";
|
||||
reg = <0x0 0x1500000 0x0 0x1000>;
|
||||
gpio-bank = <1>;
|
||||
ngpios = <23>;
|
||||
interrupt-parent = <&gic>;
|
||||
interrupts = <GIC_SHARED 14 IRQ_TYPE_LEVEL_HIGH>;
|
||||
gpio-controller;
|
||||
#gpio-cells = <2>;
|
||||
gpio-ranges = <&olb 0 29 23>;
|
||||
interrupt-controller;
|
||||
#interrupt-cells = <2>;
|
||||
resets = <&olb 0 26>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -109,6 +109,28 @@
|
||||
clock-names = "ref";
|
||||
};
|
||||
|
||||
emmc: mmc@d8010000 {
|
||||
compatible = "mobileye,eyeq-sd4hc", "cdns,sd4hc";
|
||||
reg = <0 0xd8010000 0x0 0x1000>;
|
||||
interrupt-parent = <&gic>;
|
||||
interrupts = <GIC_SHARED 91 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&olb_south EQ6HC_SOUTH_DIV_EMMC>;
|
||||
bus-width = <8>;
|
||||
max-frequency = <200000000>;
|
||||
mmc-ddr-1_8v;
|
||||
sd-uhs-ddr50;
|
||||
mmc-hs200-1_8v;
|
||||
mmc-hs400-1_8v;
|
||||
mmc-hs400-enhanced-strobe;
|
||||
|
||||
cdns,phy-input-delay-legacy = <4>;
|
||||
cdns,phy-input-delay-mmc-highspeed = <2>;
|
||||
cdns,phy-input-delay-mmc-ddr = <3>;
|
||||
cdns,phy-dll-delay-sdclk = <32>;
|
||||
cdns,phy-dll-delay-sdclk-hsmmc = <32>;
|
||||
cdns,phy-dll-delay-strobe = <32>;
|
||||
};
|
||||
|
||||
olb_south: system-controller@d8013000 {
|
||||
compatible = "mobileye,eyeq6h-south-olb", "syscon";
|
||||
reg = <0x0 0xd8013000 0x0 0x1000>;
|
||||
|
||||
@@ -156,6 +156,15 @@
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
};
|
||||
|
||||
wifi: wifi@180c0000 {
|
||||
compatible = "qca,ar9130-wifi";
|
||||
reg = <0x180c0000 0x230000>;
|
||||
|
||||
interrupts = <2>;
|
||||
|
||||
status = "disabled";
|
||||
};
|
||||
};
|
||||
|
||||
usb_phy: usb-phy {
|
||||
|
||||
@@ -108,3 +108,7 @@
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&wifi {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
@@ -285,6 +285,15 @@
|
||||
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
wifi: wifi@18100000 {
|
||||
compatible = "qca,ar9330-wifi";
|
||||
reg = <0x18100000 0x20000>;
|
||||
|
||||
interrupts = <2>;
|
||||
|
||||
status = "disabled";
|
||||
};
|
||||
};
|
||||
|
||||
usb_phy: usb-phy {
|
||||
|
||||
@@ -97,3 +97,7 @@
|
||||
&phy_port4 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&wifi {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
@@ -98,3 +98,7 @@
|
||||
reg = <0>;
|
||||
};
|
||||
};
|
||||
|
||||
&wifi {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
@@ -74,3 +74,7 @@
|
||||
reg = <0>;
|
||||
};
|
||||
};
|
||||
|
||||
&wifi {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
@@ -106,3 +106,7 @@
|
||||
&phy_port4 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&wifi {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
@@ -114,3 +114,7 @@
|
||||
reg = <0>;
|
||||
};
|
||||
};
|
||||
|
||||
&wifi {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
led-power-green {
|
||||
label = "smartgw:power:green";
|
||||
gpios = <&gpio 19 GPIO_ACTIVE_HIGH>;
|
||||
default-state = "off";
|
||||
linux,default-trigger = "timer";
|
||||
};
|
||||
|
||||
led-power-red {
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
#size-cells = <1>;
|
||||
|
||||
sysc: syscon@0 {
|
||||
compatible = "ralink,mt7628-sysc", "syscon";
|
||||
compatible = "ralink,mt7628-sysc", "ralink,mt7688-sysc", "syscon";
|
||||
reg = <0x0 0x60>;
|
||||
#clock-cells = <1>;
|
||||
#reset-cells = <1>;
|
||||
@@ -134,13 +134,8 @@
|
||||
|
||||
watchdog: watchdog@100 {
|
||||
compatible = "mediatek,mt7621-wdt";
|
||||
reg = <0x100 0x30>;
|
||||
|
||||
resets = <&sysc 8>;
|
||||
reset-names = "wdt";
|
||||
|
||||
interrupt-parent = <&intc>;
|
||||
interrupts = <24>;
|
||||
reg = <0x100 0x100>;
|
||||
mediatek,sysctl = <&sysc>;
|
||||
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
@@ -71,3 +71,99 @@
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&mdio0 {
|
||||
/* External RTL8224 */
|
||||
phy0: ethernet-phy@0 {
|
||||
reg = <0>;
|
||||
compatible = "ethernet-phy-ieee802.3-c45";
|
||||
};
|
||||
phy1: ethernet-phy@1 {
|
||||
reg = <1>;
|
||||
compatible = "ethernet-phy-ieee802.3-c45";
|
||||
};
|
||||
phy2: ethernet-phy@2 {
|
||||
reg = <2>;
|
||||
compatible = "ethernet-phy-ieee802.3-c45";
|
||||
};
|
||||
phy3: ethernet-phy@3 {
|
||||
reg = <3>;
|
||||
compatible = "ethernet-phy-ieee802.3-c45";
|
||||
};
|
||||
};
|
||||
|
||||
&mdio1 {
|
||||
/* External RTL8224 */
|
||||
phy4: ethernet-phy@0 {
|
||||
reg = <0>;
|
||||
compatible = "ethernet-phy-ieee802.3-c45";
|
||||
};
|
||||
phy5: ethernet-phy@1 {
|
||||
reg = <1>;
|
||||
compatible = "ethernet-phy-ieee802.3-c45";
|
||||
};
|
||||
phy6: ethernet-phy@2 {
|
||||
reg = <2>;
|
||||
compatible = "ethernet-phy-ieee802.3-c45";
|
||||
};
|
||||
phy7: ethernet-phy@3 {
|
||||
reg = <3>;
|
||||
compatible = "ethernet-phy-ieee802.3-c45";
|
||||
};
|
||||
};
|
||||
|
||||
&switch0 {
|
||||
ethernet-ports {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
port@0 {
|
||||
reg = <0>;
|
||||
phy-handle = <&phy0>;
|
||||
phy-mode = "usxgmii";
|
||||
};
|
||||
port@1 {
|
||||
reg = <1>;
|
||||
phy-handle = <&phy1>;
|
||||
phy-mode = "usxgmii";
|
||||
};
|
||||
port@2 {
|
||||
reg = <2>;
|
||||
phy-handle = <&phy2>;
|
||||
phy-mode = "usxgmii";
|
||||
};
|
||||
port@3 {
|
||||
reg = <3>;
|
||||
phy-handle = <&phy3>;
|
||||
phy-mode = "usxgmii";
|
||||
};
|
||||
port@16 {
|
||||
reg = <16>;
|
||||
phy-handle = <&phy4>;
|
||||
phy-mode = "usxgmii";
|
||||
};
|
||||
port@17 {
|
||||
reg = <17>;
|
||||
phy-handle = <&phy5>;
|
||||
phy-mode = "usxgmii";
|
||||
};
|
||||
port@18 {
|
||||
reg = <18>;
|
||||
phy-handle = <&phy6>;
|
||||
phy-mode = "usxgmii";
|
||||
};
|
||||
port@19 {
|
||||
reg = <19>;
|
||||
phy-handle = <&phy7>;
|
||||
phy-mode = "usxgmii";
|
||||
};
|
||||
port@24{
|
||||
reg = <24>;
|
||||
phy-mode = "10gbase-r";
|
||||
};
|
||||
port@25{
|
||||
reg = <25>;
|
||||
phy-mode = "10gbase-r";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -48,6 +48,10 @@
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
interrupt-parent = <&intc>;
|
||||
interrupts = <23>, <24>;
|
||||
interrupt-names = "switch", "nic";
|
||||
|
||||
reboot@c {
|
||||
compatible = "syscon-reboot";
|
||||
reg = <0x0c 0x4>;
|
||||
@@ -138,6 +142,33 @@
|
||||
clocks = <&lx_clk>;
|
||||
};
|
||||
|
||||
watchdog0: watchdog@3260 {
|
||||
compatible = "realtek,rtl9300-wdt";
|
||||
reg = <0x3260 0xc>;
|
||||
|
||||
realtek,reset-mode = "soc";
|
||||
|
||||
clocks = <&lx_clk>;
|
||||
timeout-sec = <30>;
|
||||
|
||||
interrupt-parent = <&intc>;
|
||||
interrupt-names = "phase1", "phase2";
|
||||
interrupts = <5>, <6>;
|
||||
};
|
||||
|
||||
gpio0: gpio@3300 {
|
||||
compatible = "realtek,rtl9300-gpio", "realtek,otto-gpio";
|
||||
reg = <0x3300 0x1c>, <0x3338 0x8>;
|
||||
gpio-controller;
|
||||
#gpio-cells = <2>;
|
||||
ngpios = <24>;
|
||||
|
||||
interrupt-controller;
|
||||
#interrupt-cells = <2>;
|
||||
interrupt-parent = <&intc>;
|
||||
interrupts = <13>;
|
||||
};
|
||||
|
||||
snand: spi@1a400 {
|
||||
compatible = "realtek,rtl9301-snand";
|
||||
reg = <0x1a400 0x44>;
|
||||
|
||||
@@ -19,20 +19,18 @@ CONFIG_SCHED_AUTOGROUP=y
|
||||
CONFIG_BLK_DEV_INITRD=y
|
||||
CONFIG_EXPERT=y
|
||||
CONFIG_EYEQ=y
|
||||
CONFIG_MACH_EYEQ5=y
|
||||
CONFIG_FIT_IMAGE_FDT_EPM5=y
|
||||
CONFIG_PAGE_SIZE_16KB=y
|
||||
CONFIG_MIPS_CPS=y
|
||||
CONFIG_CPU_HAS_MSA=y
|
||||
CONFIG_NR_CPUS=16
|
||||
CONFIG_MIPS_RAW_APPENDED_DTB=y
|
||||
CONFIG_JUMP_LABEL=y
|
||||
CONFIG_PAGE_SIZE_16KB=y
|
||||
CONFIG_COMPAT_32BIT_TIME=y
|
||||
CONFIG_MODULES=y
|
||||
CONFIG_MODULE_UNLOAD=y
|
||||
CONFIG_TRIM_UNUSED_KSYMS=y
|
||||
# CONFIG_COMPAT_BRK is not set
|
||||
CONFIG_SPARSEMEM_MANUAL=y
|
||||
CONFIG_USERFAULTFD=y
|
||||
CONFIG_NET=y
|
||||
CONFIG_PACKET=y
|
||||
@@ -64,8 +62,14 @@ CONFIG_CAN_M_CAN=y
|
||||
CONFIG_SERIAL_AMBA_PL011=y
|
||||
CONFIG_SERIAL_AMBA_PL011_CONSOLE=y
|
||||
CONFIG_HW_RANDOM=y
|
||||
CONFIG_I2C=y
|
||||
CONFIG_I2C_CHARDEV=y
|
||||
CONFIG_I2C_NOMADIK=y
|
||||
# CONFIG_PTP_1588_CLOCK is not set
|
||||
CONFIG_PINCTRL=y
|
||||
CONFIG_GPIOLIB=y
|
||||
CONFIG_GPIO_NOMADIK=y
|
||||
CONFIG_SENSORS_LM75=y
|
||||
CONFIG_MFD_SYSCON=y
|
||||
CONFIG_HID_A4TECH=y
|
||||
CONFIG_HID_BELKIN=y
|
||||
@@ -79,6 +83,8 @@ CONFIG_HID_MICROSOFT=y
|
||||
CONFIG_HID_MONTEREY=y
|
||||
CONFIG_MMC=y
|
||||
CONFIG_MMC_SDHCI=y
|
||||
CONFIG_MMC_SDHCI_PLTFM=y
|
||||
CONFIG_MMC_SDHCI_CADENCE=y
|
||||
# CONFIG_IOMMU_SUPPORT is not set
|
||||
CONFIG_RESET_CONTROLLER=y
|
||||
# CONFIG_NVMEM is not set
|
||||
|
||||
@@ -82,6 +82,8 @@ CONFIG_HID_MICROSOFT=y
|
||||
CONFIG_HID_MONTEREY=y
|
||||
CONFIG_MMC=y
|
||||
CONFIG_MMC_SDHCI=y
|
||||
CONFIG_MMC_SDHCI_PLTFM=y
|
||||
CONFIG_MMC_SDHCI_CADENCE=y
|
||||
# CONFIG_IOMMU_SUPPORT is not set
|
||||
CONFIG_RESET_CONTROLLER=y
|
||||
# CONFIG_NVMEM is not set
|
||||
|
||||
@@ -123,6 +123,7 @@ extern struct cpuinfo_mips cpu_data[];
|
||||
|
||||
extern void cpu_probe(void);
|
||||
extern void cpu_report(void);
|
||||
extern void cpu_disable_mmid(void);
|
||||
|
||||
extern const char *__cpu_name[];
|
||||
#define cpu_name_string() __cpu_name[raw_smp_processor_id()]
|
||||
|
||||
@@ -29,8 +29,4 @@ static inline void CMOS_WRITE(unsigned char data, unsigned long addr)
|
||||
|
||||
#define RTC_ALWAYS_BCD 0
|
||||
|
||||
#ifndef mc146818_decode_year
|
||||
#define mc146818_decode_year(year) ((year) < 70 ? (year) + 2000 : (year) + 1900)
|
||||
#endif
|
||||
|
||||
#endif /* __ASM_MACH_GENERIC_MC146818RTC_H */
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* Copyright (C) 2003 Ralf Baechle <ralf@linux-mips.org>
|
||||
* 2004-2007 Stanislaw Skowronek <skylark@unaligned.org>
|
||||
* 2009 Johannes Dickgreber <tanzy@gmx.de>
|
||||
* 2015 Joshua Kinard <kumba@gentoo.org>
|
||||
* 2015 Joshua Kinard <linux@kumba.dev>
|
||||
*
|
||||
*/
|
||||
#ifndef __ASM_MACH_IP30_CPU_FEATURE_OVERRIDES_H
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 */
|
||||
/*
|
||||
* Copyright (C) 2016 Joshua Kinard <kumba@gentoo.org>
|
||||
* Copyright (C) 2016 Joshua Kinard <linux@kumba.dev>
|
||||
*
|
||||
*/
|
||||
#ifndef _ASM_MACH_IP30_SPACES_H
|
||||
|
||||
@@ -33,6 +33,4 @@ static inline void CMOS_WRITE(unsigned char data, unsigned long addr)
|
||||
|
||||
#define RTC_ALWAYS_BCD 0
|
||||
|
||||
#define mc146818_decode_year(year) ((year) + 1980)
|
||||
|
||||
#endif /* __ASM_MACH_JAZZ_MC146818RTC_H */
|
||||
|
||||
@@ -99,5 +99,8 @@ extern __iomem void *ltq_cgu_membase;
|
||||
extern void ltq_pmu_enable(unsigned int module);
|
||||
extern void ltq_pmu_disable(unsigned int module);
|
||||
|
||||
/* VMMC */
|
||||
extern unsigned int *ltq_get_cp1_base(void);
|
||||
|
||||
#endif /* CONFIG_SOC_TYPE_XWAY */
|
||||
#endif /* _LTQ_XWAY_H__ */
|
||||
|
||||
@@ -31,6 +31,4 @@ static inline void CMOS_WRITE(unsigned char data, unsigned long addr)
|
||||
|
||||
#define RTC_ALWAYS_BCD 0
|
||||
|
||||
#define mc146818_decode_year(year) ((year) < 70 ? (year) + 2000 : (year) + 1900)
|
||||
|
||||
#endif /* __ASM_MACH_MALTA_MC146818RTC_H */
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
/*
|
||||
* This file is subject to the terms and conditions of the GNU General Public
|
||||
* License. See the file "COPYING" in the main directory of this archive
|
||||
* for more details.
|
||||
*
|
||||
* Copyright (C) 2004 by Ralf Baechle
|
||||
*
|
||||
* RTC routines for PC style attached Dallas chip with ARC epoch.
|
||||
*/
|
||||
#ifndef __ASM_MACH_RM_MC146818RTC_H
|
||||
#define __ASM_MACH_RM_MC146818RTC_H
|
||||
|
||||
#ifdef CONFIG_CPU_BIG_ENDIAN
|
||||
#define mc146818_decode_year(year) ((year) < 70 ? (year) + 2000 : (year) + 1900)
|
||||
#else
|
||||
#define mc146818_decode_year(year) ((year) + 1980)
|
||||
#endif
|
||||
|
||||
#include <asm/mach-generic/mc146818rtc.h>
|
||||
|
||||
#endif /* __ASM_MACH_RM_MC146818RTC_H */
|
||||
@@ -8,112 +8,21 @@
|
||||
#ifndef __ASM_MC146818_TIME_H
|
||||
#define __ASM_MC146818_TIME_H
|
||||
|
||||
#include <linux/bcd.h>
|
||||
#include <linux/mc146818rtc.h>
|
||||
#include <linux/time.h>
|
||||
|
||||
/*
|
||||
* For check timing call set_rtc_mmss() 500ms; used in timer interrupt.
|
||||
*/
|
||||
#define USEC_AFTER 500000
|
||||
#define USEC_BEFORE 500000
|
||||
|
||||
/*
|
||||
* In order to set the CMOS clock precisely, set_rtc_mmss has to be
|
||||
* called 500 ms after the second nowtime has started, because when
|
||||
* nowtime is written into the registers of the CMOS clock, it will
|
||||
* jump to the next second precisely 500 ms later. Check the Motorola
|
||||
* MC146818A or Dallas DS12887 data sheet for details.
|
||||
*
|
||||
* BUG: This routine does not handle hour overflow properly; it just
|
||||
* sets the minutes. Usually you'll only notice that after reboot!
|
||||
*/
|
||||
static inline int mc146818_set_rtc_mmss(unsigned long nowtime)
|
||||
{
|
||||
int real_seconds, real_minutes, cmos_minutes;
|
||||
unsigned char save_control, save_freq_select;
|
||||
int retval = 0;
|
||||
unsigned long flags;
|
||||
|
||||
spin_lock_irqsave(&rtc_lock, flags);
|
||||
save_control = CMOS_READ(RTC_CONTROL); /* tell the clock it's being set */
|
||||
CMOS_WRITE((save_control|RTC_SET), RTC_CONTROL);
|
||||
|
||||
save_freq_select = CMOS_READ(RTC_FREQ_SELECT); /* stop and reset prescaler */
|
||||
CMOS_WRITE((save_freq_select|RTC_DIV_RESET2), RTC_FREQ_SELECT);
|
||||
|
||||
cmos_minutes = CMOS_READ(RTC_MINUTES);
|
||||
if (!(save_control & RTC_DM_BINARY) || RTC_ALWAYS_BCD)
|
||||
cmos_minutes = bcd2bin(cmos_minutes);
|
||||
|
||||
/*
|
||||
* since we're only adjusting minutes and seconds,
|
||||
* don't interfere with hour overflow. This avoids
|
||||
* messing with unknown time zones but requires your
|
||||
* RTC not to be off by more than 15 minutes
|
||||
*/
|
||||
real_seconds = nowtime % 60;
|
||||
real_minutes = nowtime / 60;
|
||||
if (((abs(real_minutes - cmos_minutes) + 15)/30) & 1)
|
||||
real_minutes += 30; /* correct for half hour time zone */
|
||||
real_minutes %= 60;
|
||||
|
||||
if (abs(real_minutes - cmos_minutes) < 30) {
|
||||
if (!(save_control & RTC_DM_BINARY) || RTC_ALWAYS_BCD) {
|
||||
real_seconds = bin2bcd(real_seconds);
|
||||
real_minutes = bin2bcd(real_minutes);
|
||||
}
|
||||
CMOS_WRITE(real_seconds, RTC_SECONDS);
|
||||
CMOS_WRITE(real_minutes, RTC_MINUTES);
|
||||
} else {
|
||||
printk_once(KERN_NOTICE
|
||||
"set_rtc_mmss: can't update from %d to %d\n",
|
||||
cmos_minutes, real_minutes);
|
||||
retval = -1;
|
||||
}
|
||||
|
||||
/* The following flags have to be released exactly in this order,
|
||||
* otherwise the DS12887 (popular MC146818A clone with integrated
|
||||
* battery and quartz) will not reset the oscillator and will not
|
||||
* update precisely 500 ms later. You won't find this mentioned in
|
||||
* the Dallas Semiconductor data sheets, but who believes data
|
||||
* sheets anyway ... -- Markus Kuhn
|
||||
*/
|
||||
CMOS_WRITE(save_control, RTC_CONTROL);
|
||||
CMOS_WRITE(save_freq_select, RTC_FREQ_SELECT);
|
||||
spin_unlock_irqrestore(&rtc_lock, flags);
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_RTC_MC146818_LIB
|
||||
static inline time64_t mc146818_get_cmos_time(void)
|
||||
{
|
||||
unsigned int year, mon, day, hour, min, sec;
|
||||
unsigned long flags;
|
||||
struct rtc_time tm;
|
||||
|
||||
spin_lock_irqsave(&rtc_lock, flags);
|
||||
|
||||
do {
|
||||
sec = CMOS_READ(RTC_SECONDS);
|
||||
min = CMOS_READ(RTC_MINUTES);
|
||||
hour = CMOS_READ(RTC_HOURS);
|
||||
day = CMOS_READ(RTC_DAY_OF_MONTH);
|
||||
mon = CMOS_READ(RTC_MONTH);
|
||||
year = CMOS_READ(RTC_YEAR);
|
||||
} while (sec != CMOS_READ(RTC_SECONDS));
|
||||
|
||||
if (!(CMOS_READ(RTC_CONTROL) & RTC_DM_BINARY) || RTC_ALWAYS_BCD) {
|
||||
sec = bcd2bin(sec);
|
||||
min = bcd2bin(min);
|
||||
hour = bcd2bin(hour);
|
||||
day = bcd2bin(day);
|
||||
mon = bcd2bin(mon);
|
||||
year = bcd2bin(year);
|
||||
if (mc146818_get_time(&tm, 1000)) {
|
||||
pr_err("Unable to read current time from RTC\n");
|
||||
return 0;
|
||||
}
|
||||
spin_unlock_irqrestore(&rtc_lock, flags);
|
||||
year = mc146818_decode_year(year);
|
||||
|
||||
return mktime64(year, mon, day, hour, min, sec);
|
||||
return rtc_tm_to_time64(&tm);
|
||||
}
|
||||
#endif /* CONFIG_RTC_MC146818_LIB */
|
||||
|
||||
#endif /* __ASM_MC146818_TIME_H */
|
||||
|
||||
@@ -258,6 +258,8 @@ static inline bool mips_cps_multicluster_cpus(void)
|
||||
|
||||
/**
|
||||
* mips_cps_first_online_in_cluster() - Detect if CPU is first online in cluster
|
||||
* @first_cpu: The first other online CPU in cluster, or nr_cpu_ids if
|
||||
* the function returns true.
|
||||
*
|
||||
* Determine whether the local CPU is the first to be brought online in its
|
||||
* cluster - that is, whether there are any other online CPUs in the local
|
||||
@@ -265,6 +267,6 @@ static inline bool mips_cps_multicluster_cpus(void)
|
||||
*
|
||||
* Returns true if this CPU is first online, else false.
|
||||
*/
|
||||
extern unsigned int mips_cps_first_online_in_cluster(void);
|
||||
extern unsigned int mips_cps_first_online_in_cluster(int *first_cpu);
|
||||
|
||||
#endif /* __MIPS_ASM_MIPS_CPS_H__ */
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*
|
||||
* Copyright (C) 2004-2007 Stanislaw Skowronek <skylark@unaligned.org>
|
||||
* 2009 Johannes Dickgreber <tanzy@gmx.de>
|
||||
* 2007-2015 Joshua Kinard <kumba@gentoo.org>
|
||||
* 2007-2015 Joshua Kinard <linux@kumba.dev>
|
||||
*/
|
||||
#ifndef __ASM_SGI_HEART_H
|
||||
#define __ASM_SGI_HEART_H
|
||||
|
||||
@@ -24,6 +24,7 @@ struct core_boot_config {
|
||||
|
||||
struct cluster_boot_config {
|
||||
unsigned long *core_power;
|
||||
struct cpumask cpumask;
|
||||
struct core_boot_config *core_config;
|
||||
};
|
||||
|
||||
|
||||
@@ -119,4 +119,12 @@ void cleanup_tc(struct tc *tc);
|
||||
|
||||
int __init vpe_module_init(void);
|
||||
void __exit vpe_module_exit(void);
|
||||
|
||||
#ifdef CONFIG_MIPS_VPE_LOADER_MT
|
||||
void *vpe_alloc(void);
|
||||
int vpe_start(void *vpe, unsigned long start);
|
||||
int vpe_stop(void *vpe);
|
||||
int vpe_free(void *vpe);
|
||||
#endif /* CONFIG_MIPS_VPE_LOADER_MT */
|
||||
|
||||
#endif /* _ASM_VPE_H */
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
*/
|
||||
#include <linux/init.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/mmu_context.h>
|
||||
#include <linux/ptrace.h>
|
||||
#include <linux/smp.h>
|
||||
#include <linux/stddef.h>
|
||||
@@ -37,6 +38,8 @@
|
||||
unsigned int elf_hwcap __read_mostly;
|
||||
EXPORT_SYMBOL_GPL(elf_hwcap);
|
||||
|
||||
static bool mmid_disabled_quirk;
|
||||
|
||||
static inline unsigned long cpu_get_msa_id(void)
|
||||
{
|
||||
unsigned long status, msa_id;
|
||||
@@ -645,7 +648,7 @@ static inline unsigned int decode_config5(struct cpuinfo_mips *c)
|
||||
config5 &= ~(MIPS_CONF5_UFR | MIPS_CONF5_UFE);
|
||||
|
||||
if (cpu_has_mips_r6) {
|
||||
if (!__builtin_constant_p(cpu_has_mmid) || cpu_has_mmid)
|
||||
if (!mmid_disabled_quirk && (!__builtin_constant_p(cpu_has_mmid) || cpu_has_mmid))
|
||||
config5 |= MIPS_CONF5_MI;
|
||||
else
|
||||
config5 &= ~MIPS_CONF5_MI;
|
||||
@@ -708,7 +711,6 @@ static inline unsigned int decode_config5(struct cpuinfo_mips *c)
|
||||
max_mmid_width);
|
||||
asid_mask = GENMASK(max_mmid_width - 1, 0);
|
||||
}
|
||||
|
||||
set_cpu_asid_mask(c, asid_mask);
|
||||
}
|
||||
}
|
||||
@@ -2046,3 +2048,39 @@ void cpu_set_vpe_id(struct cpuinfo_mips *cpuinfo, unsigned int vpe)
|
||||
cpuinfo->globalnumber &= ~MIPS_GLOBALNUMBER_VP;
|
||||
cpuinfo->globalnumber |= vpe << MIPS_GLOBALNUMBER_VP_SHF;
|
||||
}
|
||||
|
||||
void cpu_disable_mmid(void)
|
||||
{
|
||||
int i;
|
||||
unsigned long asid_mask;
|
||||
unsigned int cpu = smp_processor_id();
|
||||
struct cpuinfo_mips *c = ¤t_cpu_data;
|
||||
unsigned int config4 = read_c0_config4();
|
||||
unsigned int config5 = read_c0_config5();
|
||||
|
||||
/* Setup the initial ASID mask based on config4 */
|
||||
asid_mask = MIPS_ENTRYHI_ASID;
|
||||
if (config4 & MIPS_CONF4_AE)
|
||||
asid_mask |= MIPS_ENTRYHI_ASIDX;
|
||||
set_cpu_asid_mask(c, asid_mask);
|
||||
|
||||
/* Disable MMID in the C0 and update cpuinfo_mips accordingly */
|
||||
config5 &= ~(MIPS_CONF5_UFR | MIPS_CONF5_UFE);
|
||||
config5 &= ~MIPS_CONF5_MI;
|
||||
write_c0_config5(config5);
|
||||
/* Ensure the write to config5 above takes effect */
|
||||
back_to_back_c0_hazard();
|
||||
c->options &= ~MIPS_CPU_MMID;
|
||||
|
||||
/* Setup asid cache value cleared in per_cpu_trap_init() */
|
||||
cpu_data[cpu].asid_cache = asid_first_version(cpu);
|
||||
|
||||
/* Reinit context for each CPU */
|
||||
for_each_possible_cpu(i)
|
||||
set_cpu_context(i, &init_mm, 0);
|
||||
|
||||
/* Ensure that now MMID will be seen as disable */
|
||||
mmid_disabled_quirk = true;
|
||||
|
||||
pr_info("MMID support disabled due to hardware support issue\n");
|
||||
}
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
#include <linux/spinlock.h>
|
||||
|
||||
#include <asm/mips-cps.h>
|
||||
#include <asm/smp-cps.h>
|
||||
#include <asm/mipsregs.h>
|
||||
|
||||
void __iomem *mips_gcr_base;
|
||||
@@ -248,6 +249,11 @@ void mips_cm_update_property(void)
|
||||
return;
|
||||
pr_info("HCI (Hardware Cache Init for the L2 cache) in GCR_L2_RAM_CONFIG from the CM3 is broken");
|
||||
mips_cm_is_l2_hci_broken = true;
|
||||
|
||||
/* Disable MMID only if it was configured */
|
||||
if (cpu_has_mmid)
|
||||
cpu_disable_mmid();
|
||||
|
||||
of_node_put(cm_node);
|
||||
}
|
||||
|
||||
@@ -529,39 +535,23 @@ void mips_cm_error_report(void)
|
||||
write_gcr_error_cause(cm_error);
|
||||
}
|
||||
|
||||
unsigned int mips_cps_first_online_in_cluster(void)
|
||||
unsigned int mips_cps_first_online_in_cluster(int *first_cpu)
|
||||
{
|
||||
unsigned int local_cl;
|
||||
int i;
|
||||
|
||||
local_cl = cpu_cluster(¤t_cpu_data);
|
||||
unsigned int local_cl = cpu_cluster(¤t_cpu_data);
|
||||
struct cpumask *local_cl_mask;
|
||||
|
||||
/*
|
||||
* We rely upon knowledge that CPUs are numbered sequentially by
|
||||
* cluster - ie. CPUs 0..X will be in cluster 0, CPUs X+1..Y in cluster
|
||||
* 1, CPUs Y+1..Z in cluster 2 etc. This means that CPUs in the same
|
||||
* cluster will immediately precede or follow one another.
|
||||
*
|
||||
* First we scan backwards, until we find an online CPU in the cluster
|
||||
* or we move on to another cluster.
|
||||
* mips_cps_cluster_bootcfg is allocated in cps_prepare_cpus. If it is
|
||||
* not yet done, then we are so early that only one CPU is running, so
|
||||
* it is the first online CPU in the cluster.
|
||||
*/
|
||||
for (i = smp_processor_id() - 1; i >= 0; i--) {
|
||||
if (cpu_cluster(&cpu_data[i]) != local_cl)
|
||||
break;
|
||||
if (!cpu_online(i))
|
||||
continue;
|
||||
return false;
|
||||
}
|
||||
if (IS_ENABLED(CONFIG_MIPS_CPS) && mips_cps_cluster_bootcfg)
|
||||
local_cl_mask = &mips_cps_cluster_bootcfg[local_cl].cpumask;
|
||||
else
|
||||
return true;
|
||||
|
||||
/* Then do the same for higher numbered CPUs */
|
||||
for (i = smp_processor_id() + 1; i < nr_cpu_ids; i++) {
|
||||
if (cpu_cluster(&cpu_data[i]) != local_cl)
|
||||
break;
|
||||
if (!cpu_online(i))
|
||||
continue;
|
||||
return false;
|
||||
}
|
||||
|
||||
/* We found no online CPUs in the local cluster */
|
||||
return true;
|
||||
*first_cpu = cpumask_any_and_but(local_cl_mask,
|
||||
cpu_online_mask,
|
||||
smp_processor_id());
|
||||
return (*first_cpu >= nr_cpu_ids);
|
||||
}
|
||||
|
||||
@@ -690,18 +690,20 @@ unsigned long mips_stack_top(void)
|
||||
}
|
||||
|
||||
/* Space for the VDSO, data page & GIC user page */
|
||||
top -= PAGE_ALIGN(current->thread.abi->vdso->size);
|
||||
top -= PAGE_SIZE;
|
||||
top -= mips_gic_present() ? PAGE_SIZE : 0;
|
||||
if (current->thread.abi) {
|
||||
top -= PAGE_ALIGN(current->thread.abi->vdso->size);
|
||||
top -= PAGE_SIZE;
|
||||
top -= mips_gic_present() ? PAGE_SIZE : 0;
|
||||
|
||||
/* Space to randomize the VDSO base */
|
||||
if (current->flags & PF_RANDOMIZE)
|
||||
top -= VDSO_RANDOMIZE_SIZE;
|
||||
}
|
||||
|
||||
/* Space for cache colour alignment */
|
||||
if (cpu_has_dc_aliases)
|
||||
top -= shm_align_mask + 1;
|
||||
|
||||
/* Space to randomize the VDSO base */
|
||||
if (current->flags & PF_RANDOMIZE)
|
||||
top -= VDSO_RANDOMIZE_SIZE;
|
||||
|
||||
return top;
|
||||
}
|
||||
|
||||
|
||||
@@ -138,7 +138,7 @@ static int __init reloc_handler(u32 type, u32 *loc_orig, u32 *loc_new,
|
||||
apply_r_mips_hi16_rel(loc_orig, loc_new, offset);
|
||||
break;
|
||||
default:
|
||||
pr_err("Unhandled relocation type %d at 0x%pK\n", type,
|
||||
pr_err("Unhandled relocation type %d at 0x%p\n", type,
|
||||
loc_orig);
|
||||
return -ENOEXEC;
|
||||
}
|
||||
@@ -439,10 +439,10 @@ static void show_kernel_relocation(const char *level)
|
||||
{
|
||||
if (__kaslr_offset > 0) {
|
||||
printk(level);
|
||||
pr_cont("Kernel relocated by 0x%pK\n", (void *)__kaslr_offset);
|
||||
pr_cont(" .text @ 0x%pK\n", _text);
|
||||
pr_cont(" .data @ 0x%pK\n", _sdata);
|
||||
pr_cont(" .bss @ 0x%pK\n", __bss_start);
|
||||
pr_cont("Kernel relocated by 0x%p\n", (void *)__kaslr_offset);
|
||||
pr_cont(" .text @ 0x%p\n", _text);
|
||||
pr_cont(" .data @ 0x%p\n", _sdata);
|
||||
pr_cont(" .bss @ 0x%p\n", __bss_start);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -281,9 +281,20 @@ static void __init cps_smp_setup(void)
|
||||
#endif /* CONFIG_MIPS_MT_FPAFF */
|
||||
}
|
||||
|
||||
unsigned long calibrate_delay_is_known(void)
|
||||
{
|
||||
int first_cpu_cluster = 0;
|
||||
|
||||
/* The calibration has to be done on the primary CPU of the cluster */
|
||||
if (mips_cps_first_online_in_cluster(&first_cpu_cluster))
|
||||
return 0;
|
||||
|
||||
return cpu_data[first_cpu_cluster].udelay_val;
|
||||
}
|
||||
|
||||
static void __init cps_prepare_cpus(unsigned int max_cpus)
|
||||
{
|
||||
unsigned int nclusters, ncores, core_vpes, c, cl, cca;
|
||||
unsigned int nclusters, ncores, core_vpes, nvpe = 0, c, cl, cca;
|
||||
bool cca_unsuitable, cores_limited;
|
||||
struct cluster_boot_config *cluster_bootcfg;
|
||||
struct core_boot_config *core_bootcfg;
|
||||
@@ -356,10 +367,13 @@ static void __init cps_prepare_cpus(unsigned int max_cpus)
|
||||
|
||||
/* Allocate VPE boot configuration structs */
|
||||
for (c = 0; c < ncores; c++) {
|
||||
int v;
|
||||
core_vpes = core_vpe_count(cl, c);
|
||||
core_bootcfg[c].vpe_config = kcalloc(core_vpes,
|
||||
sizeof(*core_bootcfg[c].vpe_config),
|
||||
GFP_KERNEL);
|
||||
for (v = 0; v < core_vpes; v++)
|
||||
cpumask_set_cpu(nvpe++, &mips_cps_cluster_bootcfg[cl].cpumask);
|
||||
if (!core_bootcfg[c].vpe_config)
|
||||
goto err_out;
|
||||
}
|
||||
|
||||
@@ -315,7 +315,7 @@ int kvm_arch_vcpu_create(struct kvm_vcpu *vcpu)
|
||||
* we allocate is out of range, just give up now.
|
||||
*/
|
||||
if (!cpu_has_ebase_wg && virt_to_phys(gebase) >= 0x20000000) {
|
||||
kvm_err("CP0_EBase.WG required for guest exception base %pK\n",
|
||||
kvm_err("CP0_EBase.WG required for guest exception base %p\n",
|
||||
gebase);
|
||||
err = -ENOMEM;
|
||||
goto out_free_gebase;
|
||||
|
||||
@@ -36,14 +36,14 @@
|
||||
#define BOOT_NVEC (BOOT_REG_BASE | 0x04)
|
||||
#define BOOT_EVEC (BOOT_REG_BASE | 0x08)
|
||||
|
||||
void __init ltq_soc_nmi_setup(void)
|
||||
static void __init ltq_soc_nmi_setup(void)
|
||||
{
|
||||
extern void (*nmi_handler)(void);
|
||||
|
||||
ltq_w32((unsigned long)&nmi_handler, (void *)BOOT_NVEC);
|
||||
}
|
||||
|
||||
void __init ltq_soc_ejtag_setup(void)
|
||||
static void __init ltq_soc_ejtag_setup(void)
|
||||
{
|
||||
extern void (*ejtag_debug_handler)(void);
|
||||
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
#include <lantiq_soc.h>
|
||||
|
||||
#include "../clk.h"
|
||||
#include "../prom.h"
|
||||
|
||||
/* infrastructure control register */
|
||||
#define SYS1_INFRAC 0x00bc
|
||||
@@ -72,11 +73,6 @@
|
||||
static void __iomem *sysctl_membase[3], *status_membase;
|
||||
void __iomem *ltq_sys1_membase, *ltq_ebu_membase;
|
||||
|
||||
void falcon_trigger_hrst(int level)
|
||||
{
|
||||
sysctl_w32(SYSCTL_SYS1, level & 1, SYS1_HRSTOUTC);
|
||||
}
|
||||
|
||||
static inline void sysctl_wait(struct clk *clk,
|
||||
unsigned int test, unsigned int reg)
|
||||
{
|
||||
@@ -214,19 +210,16 @@ void __init ltq_soc_init(void)
|
||||
of_node_put(np_syseth);
|
||||
of_node_put(np_sysgpe);
|
||||
|
||||
if ((request_mem_region(res_status.start, resource_size(&res_status),
|
||||
res_status.name) < 0) ||
|
||||
(request_mem_region(res_ebu.start, resource_size(&res_ebu),
|
||||
res_ebu.name) < 0) ||
|
||||
(request_mem_region(res_sys[0].start,
|
||||
resource_size(&res_sys[0]),
|
||||
res_sys[0].name) < 0) ||
|
||||
(request_mem_region(res_sys[1].start,
|
||||
resource_size(&res_sys[1]),
|
||||
res_sys[1].name) < 0) ||
|
||||
(request_mem_region(res_sys[2].start,
|
||||
resource_size(&res_sys[2]),
|
||||
res_sys[2].name) < 0))
|
||||
if ((!request_mem_region(res_status.start, resource_size(&res_status),
|
||||
res_status.name)) ||
|
||||
(!request_mem_region(res_ebu.start, resource_size(&res_ebu),
|
||||
res_ebu.name)) ||
|
||||
(!request_mem_region(res_sys[0].start, resource_size(&res_sys[0]),
|
||||
res_sys[0].name)) ||
|
||||
(!request_mem_region(res_sys[1].start, resource_size(&res_sys[1]),
|
||||
res_sys[1].name)) ||
|
||||
(!request_mem_region(res_sys[2].start, resource_size(&res_sys[2]),
|
||||
res_sys[2].name)))
|
||||
pr_err("Failed to request core resources");
|
||||
|
||||
status_membase = ioremap(res_status.start,
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
|
||||
#include <asm/bootinfo.h>
|
||||
#include <asm/irq_cpu.h>
|
||||
#include <asm/time.h>
|
||||
|
||||
#include <lantiq_soc.h>
|
||||
#include <irq.h>
|
||||
@@ -335,7 +336,8 @@ static const struct irq_domain_ops irq_domain_ops = {
|
||||
.map = icu_map,
|
||||
};
|
||||
|
||||
int __init icu_of_init(struct device_node *node, struct device_node *parent)
|
||||
static int __init
|
||||
icu_of_init(struct device_node *node, struct device_node *parent)
|
||||
{
|
||||
struct device_node *eiu_node;
|
||||
struct resource res;
|
||||
|
||||
@@ -74,7 +74,7 @@ unsigned long ltq_danube_pp32_hz(void)
|
||||
return clk;
|
||||
}
|
||||
|
||||
unsigned long ltq_ar9_sys_hz(void)
|
||||
static unsigned long ltq_ar9_sys_hz(void)
|
||||
{
|
||||
if (((ltq_cgu_r32(CGU_SYS) >> 3) & 0x3) == 0x2)
|
||||
return CLOCK_393M;
|
||||
|
||||
@@ -46,7 +46,7 @@ static struct platform_driver dcdc_driver = {
|
||||
},
|
||||
};
|
||||
|
||||
int __init dcdc_init(void)
|
||||
static int __init dcdc_init(void)
|
||||
{
|
||||
int ret = platform_driver_register(&dcdc_driver);
|
||||
|
||||
|
||||
@@ -289,7 +289,7 @@ static struct platform_driver dma_driver = {
|
||||
},
|
||||
};
|
||||
|
||||
int __init
|
||||
static int __init
|
||||
dma_init(void)
|
||||
{
|
||||
return platform_driver_register(&dma_driver);
|
||||
|
||||
@@ -194,7 +194,7 @@ static struct platform_driver dma_driver = {
|
||||
},
|
||||
};
|
||||
|
||||
int __init gptu_init(void)
|
||||
static int __init gptu_init(void)
|
||||
{
|
||||
int ret = platform_driver_register(&dma_driver);
|
||||
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
* Copyright (C) 2007 Lemote Inc. & Institute of Computing Technology
|
||||
* Author: Fuxin Zhang, zhangfx@lemote.com
|
||||
*/
|
||||
#include <linux/export.h>
|
||||
#include <linux/init.h>
|
||||
|
||||
#include <asm/bootinfo.h>
|
||||
|
||||
@@ -30,7 +30,7 @@ static inline bool __debug_virt_addr_valid(unsigned long x)
|
||||
phys_addr_t __virt_to_phys(volatile const void *x)
|
||||
{
|
||||
WARN(!__debug_virt_addr_valid((unsigned long)x),
|
||||
"virt_to_phys used for non-linear address: %pK (%pS)\n",
|
||||
"virt_to_phys used for non-linear address: %p (%pS)\n",
|
||||
x, x);
|
||||
|
||||
return __virt_to_phys_nodebug(x);
|
||||
|
||||
@@ -508,6 +508,60 @@ static int __init set_ntlb(char *str)
|
||||
|
||||
__setup("ntlb=", set_ntlb);
|
||||
|
||||
/* Initialise all TLB entries with unique values */
|
||||
static void r4k_tlb_uniquify(void)
|
||||
{
|
||||
int entry = num_wired_entries();
|
||||
|
||||
htw_stop();
|
||||
write_c0_entrylo0(0);
|
||||
write_c0_entrylo1(0);
|
||||
|
||||
while (entry < current_cpu_data.tlbsize) {
|
||||
unsigned long asid_mask = cpu_asid_mask(¤t_cpu_data);
|
||||
unsigned long asid = 0;
|
||||
int idx;
|
||||
|
||||
/* Skip wired MMID to make ginvt_mmid work */
|
||||
if (cpu_has_mmid)
|
||||
asid = MMID_KERNEL_WIRED + 1;
|
||||
|
||||
/* Check for match before using UNIQUE_ENTRYHI */
|
||||
do {
|
||||
if (cpu_has_mmid) {
|
||||
write_c0_memorymapid(asid);
|
||||
write_c0_entryhi(UNIQUE_ENTRYHI(entry));
|
||||
} else {
|
||||
write_c0_entryhi(UNIQUE_ENTRYHI(entry) | asid);
|
||||
}
|
||||
mtc0_tlbw_hazard();
|
||||
tlb_probe();
|
||||
tlb_probe_hazard();
|
||||
idx = read_c0_index();
|
||||
/* No match or match is on current entry */
|
||||
if (idx < 0 || idx == entry)
|
||||
break;
|
||||
/*
|
||||
* If we hit a match, we need to try again with
|
||||
* a different ASID.
|
||||
*/
|
||||
asid++;
|
||||
} while (asid < asid_mask);
|
||||
|
||||
if (idx >= 0 && idx != entry)
|
||||
panic("Unable to uniquify TLB entry %d", idx);
|
||||
|
||||
write_c0_index(entry);
|
||||
mtc0_tlbw_hazard();
|
||||
tlb_write_indexed();
|
||||
entry++;
|
||||
}
|
||||
|
||||
tlbw_use_hazard();
|
||||
htw_start();
|
||||
flush_micro_tlb();
|
||||
}
|
||||
|
||||
/*
|
||||
* Configure TLB (for init or after a CPU has been powered off).
|
||||
*/
|
||||
@@ -547,7 +601,7 @@ static void r4k_tlb_configure(void)
|
||||
temp_tlb_entry = current_cpu_data.tlbsize - 1;
|
||||
|
||||
/* From this point on the ARC firmware is dead. */
|
||||
local_flush_tlb_all();
|
||||
r4k_tlb_uniquify();
|
||||
|
||||
/* Did I tell you that ARC SUCKS? */
|
||||
}
|
||||
|
||||
@@ -234,7 +234,7 @@ static struct platform_driver ltq_pci_driver = {
|
||||
},
|
||||
};
|
||||
|
||||
int __init pcibios_init(void)
|
||||
static int __init pcibios_init(void)
|
||||
{
|
||||
int ret = platform_driver_register(<q_pci_driver);
|
||||
if (ret)
|
||||
|
||||
@@ -264,7 +264,7 @@ static struct platform_driver rt288x_pci_driver = {
|
||||
},
|
||||
};
|
||||
|
||||
int __init pcibios_init(void)
|
||||
static int __init pcibios_init(void)
|
||||
{
|
||||
int ret = platform_driver_register(&rt288x_pci_driver);
|
||||
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
|
||||
#include <asm/irq_cpu.h>
|
||||
#include <asm/mipsregs.h>
|
||||
#include <asm/time.h>
|
||||
|
||||
#include "common.h"
|
||||
|
||||
|
||||
@@ -165,7 +165,7 @@ static void hub_domain_free(struct irq_domain *domain,
|
||||
return;
|
||||
|
||||
irqd = irq_domain_get_irq_data(domain, virq);
|
||||
if (irqd && irqd->chip_data)
|
||||
if (irqd)
|
||||
kfree(irqd->chip_data);
|
||||
}
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* ip30-power.c: Software powerdown and reset handling for IP30 architecture.
|
||||
*
|
||||
* Copyright (C) 2004-2007 Stanislaw Skowronek <skylark@unaligned.org>
|
||||
* 2014 Joshua Kinard <kumba@gentoo.org>
|
||||
* 2014 Joshua Kinard <linux@kumba.dev>
|
||||
* 2009 Johannes Dickgreber <tanzy@gmx.de>
|
||||
*/
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* SGI IP30 miscellaneous setup bits.
|
||||
*
|
||||
* Copyright (C) 2004-2007 Stanislaw Skowronek <skylark@unaligned.org>
|
||||
* 2007 Joshua Kinard <kumba@gentoo.org>
|
||||
* 2007 Joshua Kinard <linux@kumba.dev>
|
||||
* 2009 Johannes Dickgreber <tanzy@gmx.de>
|
||||
*/
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* and smp-bmips.c.
|
||||
*
|
||||
* Copyright (C) 2005-2007 Stanislaw Skowronek <skylark@unaligned.org>
|
||||
* 2006-2007, 2014-2015 Joshua Kinard <kumba@gentoo.org>
|
||||
* 2006-2007, 2014-2015 Joshua Kinard <linux@kumba.dev>
|
||||
* 2009 Johannes Dickgreber <tanzy@gmx.de>
|
||||
*/
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
*
|
||||
* Copyright (C) 2004-2007 Stanislaw Skowronek <skylark@unaligned.org>
|
||||
* Copyright (C) 2009 Johannes Dickgreber <tanzy@gmx.de>
|
||||
* Copyright (C) 2011 Joshua Kinard <kumba@gentoo.org>
|
||||
* Copyright (C) 2011 Joshua Kinard <linux@kumba.dev>
|
||||
*/
|
||||
|
||||
#include <linux/clocksource.h>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* ip30-xtalk.c - Very basic Crosstalk (XIO) detection support.
|
||||
* Copyright (C) 2004-2007 Stanislaw Skowronek <skylark@unaligned.org>
|
||||
* Copyright (C) 2009 Johannes Dickgreber <tanzy@gmx.de>
|
||||
* Copyright (C) 2007, 2014-2016 Joshua Kinard <kumba@gentoo.org>
|
||||
* Copyright (C) 2007, 2014-2016 Joshua Kinard <linux@kumba.dev>
|
||||
*/
|
||||
|
||||
#include <linux/init.h>
|
||||
|
||||
@@ -776,7 +776,7 @@ struct txx9_sramc_dev {
|
||||
};
|
||||
|
||||
static ssize_t txx9_sram_read(struct file *filp, struct kobject *kobj,
|
||||
struct bin_attribute *bin_attr,
|
||||
const struct bin_attribute *bin_attr,
|
||||
char *buf, loff_t pos, size_t size)
|
||||
{
|
||||
struct txx9_sramc_dev *dev = bin_attr->private;
|
||||
@@ -791,7 +791,7 @@ static ssize_t txx9_sram_read(struct file *filp, struct kobject *kobj,
|
||||
}
|
||||
|
||||
static ssize_t txx9_sram_write(struct file *filp, struct kobject *kobj,
|
||||
struct bin_attribute *bin_attr,
|
||||
const struct bin_attribute *bin_attr,
|
||||
char *buf, loff_t pos, size_t size)
|
||||
{
|
||||
struct txx9_sramc_dev *dev = bin_attr->private;
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
*
|
||||
* Based on work by:
|
||||
* Stanislaw Skowronek <skylark@unaligned.org>
|
||||
* Joshua Kinard <kumba@gentoo.org>
|
||||
* Joshua Kinard <linux@kumba.dev>
|
||||
* Brent Casavant <bcasavan@sgi.com> - IOC4 master driver
|
||||
* Pat Gefre <pfg@sgi.com> - IOC3 serial port IRQ demuxer
|
||||
*/
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* Copyright (C) 2019 Thomas Bogendoerfer <tbogendoerfer@suse.de>
|
||||
*
|
||||
* based on code Copyright (C) 2005 Stanislaw Skowronek <skylark@unaligned.org>
|
||||
* Copyright (C) 2014 Joshua Kinard <kumba@gentoo.org>
|
||||
* Copyright (C) 2014 Joshua Kinard <linux@kumba.dev>
|
||||
*/
|
||||
|
||||
#include <linux/module.h>
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
|
||||
#include <linux/errno.h>
|
||||
#include <linux/types.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/vmalloc.h>
|
||||
|
||||
#ifdef CONFIG_BCM47XX_NVRAM
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
#ifndef __BCM47XX_SPROM_H
|
||||
#define __BCM47XX_SPROM_H
|
||||
|
||||
#include <linux/errno.h>
|
||||
#include <linux/types.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/vmalloc.h>
|
||||
|
||||
struct ssb_sprom;
|
||||
|
||||
Reference in New Issue
Block a user