projects/linux·commit 5a7d8a28

Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus

5a7d8a28 · Linus Torvalds <[email protected]> · 2013-09-12 16:14:49 -07:00

Pull MIPS updates from Ralf Baechle:
 "This has been sitting in -next for a while with no objections and all
  MIPS defconfigs except one are building fine; that one platform got
  broken by another patch in your tree and I'm going to submit a patch
  separately.

   - a handful of fixes that didn't make 3.11
   - a few bits of Octeon 3 support with more to come for a later
     release
   - platform enhancements for Octeon, ath79, Lantiq, Netlogic and
     Ralink SOCs
   - a GPIO driver for the Octeon
   - some dusting off of the DECstation code
   - the usual dose of cleanups"

* 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus: (65 commits)
  MIPS: DMA: Fix BUG due to smp_processor_id() in preemptible code
  MIPS: kexec: Fix random crashes while loading crashkernel
  MIPS: kdump: Skip walking indirection page for crashkernels
  MIPS: DECstation HRT calibration bug fixes
  MIPS: Export copy_from_user_page() (needed by lustre)
  MIPS: Add driver for the built-in PCI controller of the RT3883 SoC
  MIPS: DMA: For BMIPS5000 cores flush region just like non-coherent R10000
  MIPS: ralink: Add support for reset-controller API
  MIPS: ralink: mt7620: Add cpu-feature-override header
  MIPS: ralink: mt7620: Add spi clock definition
  MIPS: ralink: mt7620: Add wdt clock definition
  MIPS: ralink: mt7620: Improve clock frequency detection
  MIPS: ralink: mt7620: This SoC has EHCI and OHCI hosts
  MIPS: ralink: mt7620: Add verbose ram info
  MIPS: ralink: Probe clocksources from OF
  MIPS: ralink: Add support for systick timer found on newer ralink SoC
  MIPS: ralink: Add support for periodic timer irq
  MIPS: Netlogic: Built-in DTB for XLP2xx SoC boards
  MIPS: Netlogic: Add support for USB on XLP2xx
  MIPS: Netlogic: XLP2xx update for I2C controller
  ...
Commit
5a7d8a28080caed7fd4cb1b81d092adac4445e8e
Parents
e0ea4045 · eb37e6dd

Merge commit. Changes below are compared with the first parent: e0ea4045.

Changes

103 files changed · +3109 −484

FileStatusAddDelContent
Documentation/devicetree/bindings/pci/ralink,rt3883-pci.txtadded+190−0View file
arch/mips/Kconfigmodified+5−14View file
arch/mips/Makefilemodified+29−5View file
arch/mips/ath79/clock.cmodified+149−109View file
arch/mips/ath79/common.hmodified+2−0View file
arch/mips/ath79/dev-common.cmodified+4−6View file
arch/mips/ath79/setup.cmodified+17−6View file
arch/mips/boot/.gitignoremodified+1−0View file
arch/mips/boot/Makefilemodified+15−0View file
arch/mips/boot/compressed/Makefilemodified+1−1View file
arch/mips/boot/dts/include/dt-bindingsadded+1−0View file
arch/mips/cavium-octeon/octeon-irq.cmodified+1−1View file
arch/mips/cavium-octeon/setup.cmodified+28−0View file
arch/mips/cavium-octeon/smp.cmodified+1−3View file
arch/mips/configs/xway_defconfigadded+159−0View file
arch/mips/dec/time.cmodified+3−2View file
arch/mips/include/asm/Kbuildmodified+13−0View file
arch/mips/include/asm/bmips.hmodified+22−33View file
arch/mips/include/asm/cpu.hmodified+5−1View file
arch/mips/include/asm/cputime.hdeleted+0−6View before deletion
arch/mips/include/asm/current.hdeleted+0−1View before deletion
arch/mips/include/asm/emergency-restart.hdeleted+0−6View before deletion
arch/mips/include/asm/local64.hdeleted+0−1View before deletion
arch/mips/include/asm/mach-ath79/cpu-feature-overrides.hmodified+0−2View file
arch/mips/include/asm/mach-cavium-octeon/gpio.hadded+21−0View file
arch/mips/include/asm/mach-lantiq/falcon/cpu-feature-overrides.hadded+58−0View file
arch/mips/include/asm/mach-ralink/mt7620.hmodified+32−8View file
arch/mips/include/asm/mach-ralink/mt7620/cpu-feature-overrides.hadded+57−0View file
arch/mips/include/asm/mutex.hdeleted+0−9View before deletion
arch/mips/include/asm/netlogic/xlp-hal/bridge.hmodified+4−0View file
arch/mips/include/asm/netlogic/xlp-hal/iomap.hmodified+10−0View file
arch/mips/include/asm/netlogic/xlp-hal/pic.hmodified+3−2View file
arch/mips/include/asm/netlogic/xlp-hal/sys.hmodified+31−0View file
arch/mips/include/asm/netlogic/xlp-hal/xlp.hmodified+17−0View file
arch/mips/include/asm/netlogic/xlr/pic.hmodified+2−0View file
arch/mips/include/asm/octeon/octeon.hmodified+2−0View file
arch/mips/include/asm/parport.hdeleted+0−1View before deletion
arch/mips/include/asm/percpu.hdeleted+0−6View before deletion
arch/mips/include/asm/scatterlist.hdeleted+0−6View before deletion
arch/mips/include/asm/sections.hdeleted+0−6View before deletion
arch/mips/include/asm/segment.hdeleted+0−6View before deletion
arch/mips/include/asm/serial.hdeleted+0−1View before deletion
arch/mips/include/asm/ucontext.hdeleted+0−1View before deletion
arch/mips/include/asm/xor.hdeleted+0−1View before deletion
arch/mips/include/uapi/asm/Kbuildmodified+3−2View file
arch/mips/include/uapi/asm/auxvec.hdeleted+0−4View before deletion
arch/mips/include/uapi/asm/ipcbuf.hdeleted+0−1View before deletion
arch/mips/kernel/cpu-probe.cmodified+12−0View file
arch/mips/kernel/csrc-ioasic.cmodified+3−3View file
arch/mips/kernel/idle.cmodified+1−0View file
arch/mips/kernel/mcount.Smodified+1−1View file
arch/mips/kernel/relocate_kernel.Smodified+6−0View file
arch/mips/kernel/setup.cmodified+48−51View file
arch/mips/kernel/time.cmodified+9−1View file
arch/mips/kernel/vmlinux.lds.Smodified+1−0View file
arch/mips/lantiq/falcon/sysctrl.cmodified+4−1View file
arch/mips/lantiq/xway/Makefilemodified+1−1View file
arch/mips/lantiq/xway/dcdc.cadded+63−0View file
arch/mips/lasat/image/Makefilemodified+2−4View file
arch/mips/loongson/common/Makefilemodified+2−1View file
arch/mips/math-emu/cp1emu.cmodified+0−27View file
arch/mips/mm/c-octeon.cmodified+14−0View file
arch/mips/mm/dma-default.cmodified+11−7View file
arch/mips/mm/gup.cmodified+2−1View file
arch/mips/mm/init.cmodified+1−0View file
arch/mips/mm/tlb-funcs.Smodified+2−0View file
arch/mips/mm/tlbex.cmodified+2−0View file
arch/mips/netlogic/Kconfigmodified+9−0View file
arch/mips/netlogic/common/smp.cmodified+1−3View file
arch/mips/netlogic/common/time.cmodified+2−1View file
arch/mips/netlogic/dts/Makefilemodified+1−0View file
arch/mips/netlogic/dts/xlp_evp.dtsmodified+1−8View file
arch/mips/netlogic/dts/xlp_fvp.dtsadded+118−0View file
arch/mips/netlogic/dts/xlp_svp.dtsmodified+1−8View file
arch/mips/netlogic/xlp/Makefilemodified+1−0View file
arch/mips/netlogic/xlp/dt.cmodified+7−1View file
arch/mips/netlogic/xlp/nlm_hal.cmodified+202−35View file
arch/mips/netlogic/xlp/setup.cmodified+43−7View file
arch/mips/netlogic/xlp/usb-init-xlp2.cadded+218−0View file
arch/mips/netlogic/xlp/usb-init.cmodified+4−2View file
arch/mips/netlogic/xlp/wakeup.cmodified+6−4View file
arch/mips/pci/Makefilemodified+1−0View file
arch/mips/pci/pci-octeon.cmodified+5−4View file
arch/mips/pci/pci-rt3883.cadded+636−0View file
arch/mips/powertv/Kconfigmodified+1−8View file
arch/mips/powertv/asic/asic_devices.cmodified+1−11View file
arch/mips/powertv/init.cmodified+0−4View file
arch/mips/powertv/reset.cmodified+0−12View file
arch/mips/ralink/Kconfigmodified+10−0View file
arch/mips/ralink/Makefilemodified+3−1View file
arch/mips/ralink/Platformmodified+1−0View file
arch/mips/ralink/cevt-rt3352.cadded+145−0View file
arch/mips/ralink/clk.cmodified+1−0View file
arch/mips/ralink/common.hmodified+2−0View file
arch/mips/ralink/mt7620.cmodified+180−25View file
arch/mips/ralink/of.cmodified+3−0View file
arch/mips/ralink/reset.cmodified+62−0View file
arch/mips/ralink/timer.cadded+185−0View file
arch/mips/txx9/generic/setup.cmodified+1−1View file
drivers/gpio/Kconfigmodified+8−0View file
drivers/gpio/Makefilemodified+1−0View file
drivers/gpio/gpio-octeon.cadded+157−0View file
scripts/package/buildtarmodified+21−0View file

Only the first 600 diff lines are shown. Download the complete patch.

Documentation/devicetree/bindings/pci/ralink,rt3883-pci.txt

View file
diff --git a/Documentation/devicetree/bindings/pci/ralink,rt3883-pci.txt b/Documentation/devicetree/bindings/pci/ralink,rt3883-pci.txt
new file mode 100644
index 0000000..8e0a1eb
--- /dev/null
+++ b/Documentation/devicetree/bindings/pci/ralink,rt3883-pci.txt
@@ -0,0 +1,190 @@
+* Mediatek/Ralink RT3883 PCI controller
+
+1) Main node
+
+ Required properties:
+
+ - compatible: must be "ralink,rt3883-pci"
+
+ - reg: specifies the physical base address of the controller and
+ the length of the memory mapped region.
+
+ - #address-cells: specifies the number of cells needed to encode an
+ address. The value must be 1.
+
+ - #size-cells: specifies the number of cells used to represent the size
+ of an address. The value must be 1.
+
+ - ranges: specifies the translation between child address space and parent
+ address space
+
+ Optional properties:
+
+ - status: indicates the operational status of the device.
+ Value must be either "disabled" or "okay".
+
+2) Child nodes
+
+ The main node must have two child nodes which describes the built-in
+ interrupt controller and the PCI host bridge.
+
+ a) Interrupt controller:
+
+ Required properties:
+
+ - interrupt-controller: identifies the node as an interrupt controller
+
+ - #address-cells: specifies the number of cells needed to encode an
+ address. The value must be 0. As such, 'interrupt-map' nodes do not
+ have to specify a parent unit address.
+
+ - #interrupt-cells: specifies the number of cells needed to encode an
+ interrupt source. The value must be 1.
+
+ - interrupt-parent: the phandle for the interrupt controller that
+ services interrupts for this device.
+
+ - interrupts: specifies the interrupt source of the parent interrupt
+ controller. The format of the interrupt specifier depends on the
+ parent interrupt controller.
+
+ b) PCI host bridge:
+
+ Required properties:
+
+ - #address-cells: specifies the number of cells needed to encode an
+ address. The value must be 0.
+
+ - #size-cells: specifies the number of cells used to represent the size
+ of an address. The value must be 2.
+
+ - #interrupt-cells: specifies the number of cells needed to encode an
+ interrupt source. The value must be 1.
+
+ - device_type: must be "pci"
+
+ - bus-range: PCI bus numbers covered
+
+ - ranges: specifies the ranges for the PCI memory and I/O regions
+
+ - interrupt-map-mask,
+ - interrupt-map: standard PCI properties to define the mapping of the
+ PCI interface to interrupt numbers.
+
+ The PCI host bridge node migh have additional sub-nodes representing
+ the onboard PCI devices/PCI slots. Each such sub-node must have the
+ following mandatory properties:
+
+ - reg: used only for interrupt mapping, so only the first four bytes
+ are used to refer to the correct bus number and device number.
+
+ - device_type: must be "pci"
+
+ If a given sub-node represents a PCI bridge it must have following
+ mandatory properties as well:
+
+ - #address-cells: must be set to <3>
+
+ - #size-cells: must set to <2>
+
+ - #interrupt-cells: must be set to <1>
+
+ - interrupt-map-mask,
+ - interrupt-map: standard PCI properties to define the mapping of the
+ PCI interface to interrupt numbers.
+
+ Besides the required properties the sub-nodes may have these optional
+ properties:
+
+ - status: indicates the operational status of the sub-node.
+ Value must be either "disabled" or "okay".
+
+3) Example:
+
+ a) SoC specific dtsi file:
+
+ pci@10140000 {
+ compatible = "ralink,rt3883-pci";
+ reg = <0x10140000 0x20000>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ ranges; /* direct mapping */
+
+ status = "disabled";
+
+ pciintc: interrupt-controller {
+ interrupt-controller;
+ #address-cells = <0>;
+ #interrupt-cells = <1>;
+
+ interrupt-parent = <&cpuintc>;
+ interrupts = <4>;
+ };
+
+ host-bridge {
+ #address-cells = <3>;
+ #size-cells = <2>;
+ #interrupt-cells = <1>;
+
+ device_type = "pci";
+
+ bus-range = <0 255>;
+ ranges = <
+ 0x02000000 0 0x00000000 0x20000000 0 0x10000000 /* pci memory */
+ 0x01000000 0 0x00000000 0x10160000 0 0x00010000 /* io space */
+ >;
+
+ interrupt-map-mask = <0xf800 0 0 7>;
+ interrupt-map = <
+ /* IDSEL 17 */
+ 0x8800 0 0 1 &pciintc 18
+ 0x8800 0 0 2 &pciintc 18
+ 0x8800 0 0 3 &pciintc 18
+ 0x8800 0 0 4 &pciintc 18
+ /* IDSEL 18 */
+ 0x9000 0 0 1 &pciintc 19
+ 0x9000 0 0 2 &pciintc 19
+ 0x9000 0 0 3 &pciintc 19
+ 0x9000 0 0 4 &pciintc 19
+ >;
+
+ pci-bridge@1 {
+ reg = <0x0800 0 0 0 0>;
+ device_type = "pci";
+ #interrupt-cells = <1>;
+ #address-cells = <3>;
+ #size-cells = <2>;
+
+ interrupt-map-mask = <0x0 0 0 0>;
+ interrupt-map = <0x0 0 0 0 &pciintc 20>;
+
+ status = "disabled";
+ };
+
+ pci-slot@17 {
+ reg = <0x8800 0 0 0 0>;
+ device_type = "pci";
+
+ status = "disabled";
+ };
+
+ pci-slot@18 {
+ reg = <0x9000 0 0 0 0>;
+ device_type = "pci";
+
+ status = "disabled";
+ };
+ };
+ };
+
+ b) Board specific dts file:
+
+ pci@10140000 {
+ status = "okay";
+
+ host-bridge {
+ pci-bridge@1 {
+ status = "okay";
+ };
+ };
+ };

arch/mips/Kconfig

View file
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
index 71f15e7..a9668d4 100644
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -95,6 +95,7 @@ config ATH79
select CSRC_R4K
select DMA_NONCOHERENT
select HAVE_CLK
+ select CLKDEV_LOOKUP
select IRQ_CPU
select MIPS_MACHINE
select SYS_HAS_CPU_MIPS32_R2
@@ -131,7 +132,6 @@ config BCM63XX
select IRQ_CPU
select SYS_HAS_CPU_MIPS32_R1
select SYS_HAS_CPU_BMIPS4350 if !BCM63XX_CPU_6338 && !BCM63XX_CPU_6345 && !BCM63XX_CPU_6348
- select NR_CPUS_DEFAULT_2
select SYS_SUPPORTS_32BIT_KERNEL
select SYS_SUPPORTS_BIG_ENDIAN
select SYS_HAS_EARLY_PRINTK
@@ -445,6 +445,8 @@ config RALINK
select SYS_HAS_EARLY_PRINTK
select HAVE_MACH_CLKDEV
select CLKDEV_LOOKUP
+ select ARCH_HAS_RESET_CONTROLLER
+ select RESET_CONTROLLER
config SGI_IP22
bool "SGI IP22 (Indy/Indigo2)"
@@ -609,7 +611,6 @@ config SIBYTE_SWARM
select BOOT_ELF32
select DMA_COHERENT
select HAVE_PATA_PLATFORM
- select NR_CPUS_DEFAULT_2
select SIBYTE_SB1250
select SWAP_IO_SPACE
select SYS_HAS_CPU_SB1
@@ -623,7 +624,6 @@ config SIBYTE_LITTLESUR
select BOOT_ELF32
select DMA_COHERENT
select HAVE_PATA_PLATFORM
- select NR_CPUS_DEFAULT_2
select SIBYTE_SB1250
select SWAP_IO_SPACE
select SYS_HAS_CPU_SB1
@@ -635,7 +635,6 @@ config SIBYTE_SENTOSA
bool "Sibyte BCM91250E-Sentosa"
select BOOT_ELF32
select DMA_COHERENT
- select NR_CPUS_DEFAULT_2
select SIBYTE_SB1250
select SWAP_IO_SPACE
select SYS_HAS_CPU_SB1
@@ -731,6 +730,7 @@ config CAVIUM_OCTEON_SOC
select USB_ARCH_HAS_OHCI
select USB_ARCH_HAS_EHCI
select HOLES_IN_ZONE
+ select ARCH_REQUIRE_GPIOLIB
help
This option supports all of the Octeon reference boards from Cavium
Networks. It builds a kernel that dynamically determines the Octeon
@@ -1860,7 +1860,6 @@ config MIPS_MT_SMP
select CPU_MIPSR2_IRQ_VI
select CPU_MIPSR2_IRQ_EI
select MIPS_MT
- select NR_CPUS_DEFAULT_2
select SMP
select SYS_SUPPORTS_SCHED_SMT if SMP
select SYS_SUPPORTS_SMP
@@ -2171,12 +2170,6 @@ config SYS_SUPPORTS_MIPS_CMP
config SYS_SUPPORTS_SMP
bool
-config NR_CPUS_DEFAULT_1
- bool
-
-config NR_CPUS_DEFAULT_2
- bool
-
config NR_CPUS_DEFAULT_4
bool
@@ -2194,10 +2187,8 @@ config NR_CPUS_DEFAULT_64
config NR_CPUS
int "Maximum number of CPUs (2-64)"
- range 1 64 if NR_CPUS_DEFAULT_1
+ range 2 64
depends on SMP
- default "1" if NR_CPUS_DEFAULT_1
- default "2" if NR_CPUS_DEFAULT_2
default "4" if NR_CPUS_DEFAULT_4
default "8" if NR_CPUS_DEFAULT_8
default "16" if NR_CPUS_DEFAULT_16

arch/mips/Makefile

View file
diff --git a/arch/mips/Makefile b/arch/mips/Makefile
index 37f9ef3..75a36ad 100644
--- a/arch/mips/Makefile
+++ b/arch/mips/Makefile
@@ -194,6 +194,8 @@ include $(srctree)/arch/mips/Kbuild.platforms
ifdef CONFIG_PHYSICAL_START
load-y = $(CONFIG_PHYSICAL_START)
endif
+entry-y = 0x$(shell $(NM) vmlinux 2>/dev/null \
+ | grep "\bkernel_entry\b" | cut -f1 -d \ )
cflags-y += -I$(srctree)/arch/mips/include/asm/mach-generic
drivers-$(CONFIG_PCI) += arch/mips/pci/
@@ -225,6 +227,9 @@ KBUILD_CFLAGS += $(cflags-y)
KBUILD_CPPFLAGS += -DVMLINUX_LOAD_ADDRESS=$(load-y)
KBUILD_CPPFLAGS += -DDATAOFFSET=$(if $(dataoffset-y),$(dataoffset-y),0)
+bootvars-y = VMLINUX_LOAD_ADDRESS=$(load-y) \
+ VMLINUX_ENTRY_ADDRESS=$(entry-y)
+
LDFLAGS += -m $(ld-emul)
ifdef CONFIG_CC_STACKPROTECTOR
@@ -254,9 +259,25 @@ drivers-$(CONFIG_OPROFILE) += arch/mips/oprofile/
# suspend and hibernation support
drivers-$(CONFIG_PM) += arch/mips/power/
+# boot image targets (arch/mips/boot/)
+boot-y := vmlinux.bin
+boot-y += vmlinux.ecoff
+boot-y += vmlinux.srec
+ifeq ($(shell expr $(load-y) \< 0xffffffff80000000 2> /dev/null), 0)
+boot-y += uImage
+boot-y += uImage.gz
+endif
+
+# compressed boot image targets (arch/mips/boot/compressed/)
+bootz-y := vmlinuz
+bootz-y += vmlinuz.bin
+bootz-y += vmlinuz.ecoff
+bootz-y += vmlinuz.srec
+
ifdef CONFIG_LASAT
rom.bin rom.sw: vmlinux
- $(Q)$(MAKE) $(build)=arch/mips/lasat/image $@
+ $(Q)$(MAKE) $(build)=arch/mips/lasat/image \
+ $(bootvars-y) $@
endif
#
@@ -280,13 +301,14 @@ vmlinux.64: vmlinux
all: $(all-y)
# boot
-vmlinux.bin vmlinux.ecoff vmlinux.srec: $(vmlinux-32) FORCE
- $(Q)$(MAKE) $(build)=arch/mips/boot VMLINUX=$(vmlinux-32) arch/mips/boot/$@
+$(boot-y): $(vmlinux-32) FORCE
+ $(Q)$(MAKE) $(build)=arch/mips/boot VMLINUX=$(vmlinux-32) \
+ $(bootvars-y) arch/mips/boot/$@
# boot/compressed
-vmlinuz vmlinuz.bin vmlinuz.ecoff vmlinuz.srec: $(vmlinux-32) FORCE
+$(bootz-y): $(vmlinux-32) FORCE
$(Q)$(MAKE) $(build)=arch/mips/boot/compressed \
- VMLINUX_LOAD_ADDRESS=$(load-y) 32bit-bfd=$(32bit-bfd) $@
+ $(bootvars-y) 32bit-bfd=$(32bit-bfd) $@
CLEAN_FILES += vmlinux.32 vmlinux.64
@@ -323,6 +345,8 @@ define archhelp
echo ' vmlinuz.ecoff - ECOFF zboot image'
echo ' vmlinuz.bin - Raw binary zboot image'
echo ' vmlinuz.srec - SREC zboot image'
+ echo ' uImage - U-Boot image'
+ echo ' uImage.gz - U-Boot image (gzip)'
echo
echo ' These will be default as appropriate for a configured platform.'
endef

arch/mips/ath79/clock.c

View file
diff --git a/arch/mips/ath79/clock.c b/arch/mips/ath79/clock.c
index 765ef30..26479f4 100644
--- a/arch/mips/ath79/clock.c
+++ b/arch/mips/ath79/clock.c
@@ -16,6 +16,7 @@
#include <linux/init.h>
#include <linux/err.h>
#include <linux/clk.h>
+#include <linux/clkdev.h>
#include <asm/div64.h>
@@ -31,92 +32,132 @@ struct clk {
unsigned long rate;
};
-static struct clk ath79_ref_clk;
-static struct clk ath79_cpu_clk;
-static struct clk ath79_ddr_clk;
-static struct clk ath79_ahb_clk;
-static struct clk ath79_wdt_clk;
-static struct clk ath79_uart_clk;
+static void __init ath79_add_sys_clkdev(const char *id, unsigned long rate)
+{
+ struct clk *clk;
+ int err;
+
+ clk = kzalloc(sizeof(*clk), GFP_KERNEL);
+ if (!clk)
+ panic("failed to allocate %s clock structure", id);
+
+ clk->rate = rate;
+
+ err = clk_register_clkdev(clk, id, NULL);
+ if (err)
+ panic("unable to register %s clock device", id);
+}
static void __init ar71xx_clocks_init(void)
{
+ unsigned long ref_rate;
+ unsigned long cpu_rate;
+ unsigned long ddr_rate;
+ unsigned long ahb_rate;
u32 pll;
u32 freq;
u32 div;
- ath79_ref_clk.rate = AR71XX_BASE_FREQ;
+ ref_rate = AR71XX_BASE_FREQ;
pll = ath79_pll_rr(AR71XX_PLL_REG_CPU_CONFIG);
div = ((pll >> AR71XX_PLL_DIV_SHIFT) & AR71XX_PLL_DIV_MASK) + 1;
- freq = div * ath79_ref_clk.rate;
+ freq = div * ref_rate;
div = ((pll >> AR71XX_CPU_DIV_SHIFT) & AR71XX_CPU_DIV_MASK) + 1;
- ath79_cpu_clk.rate = freq / div;
+ cpu_rate = freq / div;
div = ((pll >> AR71XX_DDR_DIV_SHIFT) & AR71XX_DDR_DIV_MASK) + 1;
- ath79_ddr_clk.rate = freq / div;
+ ddr_rate = freq / div;
div = (((pll >> AR71XX_AHB_DIV_SHIFT) & AR71XX_AHB_DIV_MASK) + 1) * 2;
- ath79_ahb_clk.rate = ath79_cpu_clk.rate / div;
+ ahb_rate = cpu_rate / div;
+
+ ath79_add_sys_clkdev("ref", ref_rate);
+ ath79_add_sys_clkdev("cpu", cpu_rate);
+ ath79_add_sys_clkdev("ddr", ddr_rate);
+ ath79_add_sys_clkdev("ahb", ahb_rate);
- ath79_wdt_clk.rate = ath79_ahb_clk.rate;
- ath79_uart_clk.rate = ath79_ahb_clk.rate;
+ clk_add_alias("wdt", NULL, "ahb", NULL);
+ clk_add_alias("uart", NULL, "ahb", NULL);
}
static void __init ar724x_clocks_init(void)
{
+ unsigned long ref_rate;
+ unsigned long cpu_rate;
+ unsigned long ddr_rate;
+ unsigned long ahb_rate;
u32 pll;
u32 freq;
u32 div;
- ath79_ref_clk.rate = AR724X_BASE_FREQ;
+ ref_rate = AR724X_BASE_FREQ;
pll = ath79_pll_rr(AR724X_PLL_REG_CPU_CONFIG);
div = ((pll >> AR724X_PLL_DIV_SHIFT) & AR724X_PLL_DIV_MASK);
- freq = div * ath79_ref_clk.rate;
+ freq = div * ref_rate;
div = ((pll >> AR724X_PLL_REF_DIV_SHIFT) & AR724X_PLL_REF_DIV_MASK);
freq *= div;
- ath79_cpu_clk.rate = freq;
+ cpu_rate = freq;
div = ((pll >> AR724X_DDR_DIV_SHIFT) & AR724X_DDR_DIV_MASK) + 1;
- ath79_ddr_clk.rate = freq / div;
+ ddr_rate = freq / div;
div = (((pll >> AR724X_AHB_DIV_SHIFT) & AR724X_AHB_DIV_MASK) + 1) * 2;
- ath79_ahb_clk.rate = ath79_cpu_clk.rate / div;
+ ahb_rate = cpu_rate / div;
+
+ ath79_add_sys_clkdev("ref", ref_rate);
+ ath79_add_sys_clkdev("cpu", cpu_rate);
+ ath79_add_sys_clkdev("ddr", ddr_rate);
+ ath79_add_sys_clkdev("ahb", ahb_rate);
- ath79_wdt_clk.rate = ath79_ahb_clk.rate;
- ath79_uart_clk.rate = ath79_ahb_clk.rate;
+ clk_add_alias("wdt", NULL, "ahb", NULL);
+ clk_add_alias("uart", NULL, "ahb", NULL);
}
static void __init ar913x_clocks_init(void)
{
+ unsigned long ref_rate;
+ unsigned long cpu_rate;
+ unsigned long ddr_rate;
+ unsigned long ahb_rate;
u32 pll;
u32 freq;
u32 div;
- ath79_ref_clk.rate = AR913X_BASE_FREQ;
+ ref_rate = AR913X_BASE_FREQ;
pll = ath79_pll_rr(AR913X_PLL_REG_CPU_CONFIG);
div = ((pll >> AR913X_PLL_DIV_SHIFT) & AR913X_PLL_DIV_MASK);
- freq = div * ath79_ref_clk.rate;
+ freq = div * ref_rate;
- ath79_cpu_clk.rate = freq;
+ cpu_rate = freq;
div = ((pll >> AR913X_DDR_DIV_SHIFT) & AR913X_DDR_DIV_MASK) + 1;
- ath79_ddr_clk.rate = freq / div;
+ ddr_rate = freq / div;
div = (((pll >> AR913X_AHB_DIV_SHIFT) & AR913X_AHB_DIV_MASK) + 1) * 2;
- ath79_ahb_clk.rate = ath79_cpu_clk.rate / div;
+ ahb_rate = cpu_rate / div;
- ath79_wdt_clk.rate = ath79_ahb_clk.rate;
- ath79_uart_clk.rate = ath79_ahb_clk.rate;
+ ath79_add_sys_clkdev("ref", ref_rate);
+ ath79_add_sys_clkdev("cpu", cpu_rate);
+ ath79_add_sys_clkdev("ddr", ddr_rate);
+ ath79_add_sys_clkdev("ahb", ahb_rate);
+
+ clk_add_alias("wdt", NULL, "ahb", NULL);
+ clk_add_alias("uart", NULL, "ahb", NULL);
}
static void __init ar933x_clocks_init(void)
{
+ unsigned long ref_rate;
+ unsigned long cpu_rate;
+ unsigned long ddr_rate;
+ unsigned long ahb_rate;
u32 clock_ctrl;
u32 cpu_config;
u32 freq;
@@ -124,21 +165,21 @@ static void __init ar933x_clocks_init(void)
t = ath79_reset_rr(AR933X_RESET_REG_BOOTSTRAP);
if (t & AR933X_BOOTSTRAP_REF_CLK_40)
- ath79_ref_clk.rate = (40 * 1000 * 1000);
+ ref_rate = (40 * 1000 * 1000);
else
- ath79_ref_clk.rate = (25 * 1000 * 1000);
+ ref_rate = (25 * 1000 * 1000);
clock_ctrl = ath79_pll_rr(AR933X_PLL_CLOCK_CTRL_REG);
if (clock_ctrl & AR933X_PLL_CLOCK_CTRL_BYPASS) {
- ath79_cpu_clk.rate = ath79_ref_clk.rate;
- ath79_ahb_clk.rate = ath79_ref_clk.rate;
- ath79_ddr_clk.rate = ath79_ref_clk.rate;
+ cpu_rate = ref_rate;
+ ahb_rate = ref_rate;
+ ddr_rate = ref_rate;
} else {
cpu_config = ath79_pll_rr(AR933X_PLL_CPU_CONFIG_REG);
t = (cpu_config >> AR933X_PLL_CPU_CONFIG_REFDIV_SHIFT) &
AR933X_PLL_CPU_CONFIG_REFDIV_MASK;
- freq = ath79_ref_clk.rate / t;
+ freq = ref_rate / t;
t = (cpu_config >> AR933X_PLL_CPU_CONFIG_NINT_SHIFT) &
AR933X_PLL_CPU_CONFIG_NINT_MASK;
@@ -153,19 +194,24 @@ static void __init ar933x_clocks_init(void)
t = ((clock_ctrl >> AR933X_PLL_CLOCK_CTRL_CPU_DIV_SHIFT) &
AR933X_PLL_CLOCK_CTRL_CPU_DIV_MASK) + 1;
- ath79_cpu_clk.rate = freq / t;
+ cpu_rate = freq / t;
t = ((clock_ctrl >> AR933X_PLL_CLOCK_CTRL_DDR_DIV_SHIFT) &
AR933X_PLL_CLOCK_CTRL_DDR_DIV_MASK) + 1;
- ath79_ddr_clk.rate = freq / t;
+ ddr_rate = freq / t;
t = ((clock_ctrl >> AR933X_PLL_CLOCK_CTRL_AHB_DIV_SHIFT) &
AR933X_PLL_CLOCK_CTRL_AHB_DIV_MASK) + 1;
- ath79_ahb_clk.rate = freq / t;
+ ahb_rate = freq / t;
}
- ath79_wdt_clk.rate = ath79_ref_clk.rate;
- ath79_uart_clk.rate = ath79_ref_clk.rate;
+ ath79_add_sys_clkdev("ref", ref_rate);
+ ath79_add_sys_clkdev("cpu", cpu_rate);
+ ath79_add_sys_clkdev("ddr", ddr_rate);
+ ath79_add_sys_clkdev("ahb", ahb_rate);
+
+ clk_add_alias("wdt", NULL, "ahb", NULL);
+ clk_add_alias("uart", NULL, "ref", NULL);
}
static u32 __init ar934x_get_pll_freq(u32 ref, u32 ref_div, u32 nint, u32 nfrac,
@@ -174,12 +220,12 @@ static u32 __init ar934x_get_pll_freq(u32 ref, u32 ref_div, u32 nint, u32 nfrac,
u64 t;

This diff is incomplete. Download the complete patch.

arch/mips/ath79/common.h

View file

This diff is incomplete. Download the complete patch.

arch/mips/ath79/dev-common.c

View file

This diff is incomplete. Download the complete patch.

arch/mips/ath79/setup.c

View file

This diff is incomplete. Download the complete patch.

arch/mips/boot/.gitignore

View file

This diff is incomplete. Download the complete patch.

arch/mips/boot/Makefile

View file

This diff is incomplete. Download the complete patch.

arch/mips/boot/compressed/Makefile

View file

This diff is incomplete. Download the complete patch.

arch/mips/boot/dts/include/dt-bindings

View file

This diff is incomplete. Download the complete patch.

arch/mips/cavium-octeon/octeon-irq.c

View file

This diff is incomplete. Download the complete patch.

arch/mips/cavium-octeon/setup.c

View file

This diff is incomplete. Download the complete patch.

arch/mips/cavium-octeon/smp.c

View file

This diff is incomplete. Download the complete patch.

arch/mips/configs/xway_defconfig

View file

This diff is incomplete. Download the complete patch.

arch/mips/dec/time.c

View file

This diff is incomplete. Download the complete patch.

arch/mips/include/asm/Kbuild

View file

This diff is incomplete. Download the complete patch.

arch/mips/include/asm/bmips.h

View file

This diff is incomplete. Download the complete patch.

arch/mips/include/asm/cpu.h

View file

This diff is incomplete. Download the complete patch.

arch/mips/include/asm/cputime.h

View before deletion

This diff is incomplete. Download the complete patch.

arch/mips/include/asm/current.h

View before deletion

This diff is incomplete. Download the complete patch.

arch/mips/include/asm/emergency-restart.h

View before deletion

This diff is incomplete. Download the complete patch.

arch/mips/include/asm/local64.h

View before deletion

This diff is incomplete. Download the complete patch.

arch/mips/include/asm/mach-ath79/cpu-feature-overrides.h

View file

This diff is incomplete. Download the complete patch.

arch/mips/include/asm/mach-cavium-octeon/gpio.h

View file

This diff is incomplete. Download the complete patch.

arch/mips/include/asm/mach-lantiq/falcon/cpu-feature-overrides.h

View file

This diff is incomplete. Download the complete patch.

arch/mips/include/asm/mach-ralink/mt7620.h

View file

This diff is incomplete. Download the complete patch.

arch/mips/include/asm/mach-ralink/mt7620/cpu-feature-overrides.h

View file

This diff is incomplete. Download the complete patch.

arch/mips/include/asm/mutex.h

View before deletion

This diff is incomplete. Download the complete patch.

arch/mips/include/asm/netlogic/xlp-hal/bridge.h

View file

This diff is incomplete. Download the complete patch.

arch/mips/include/asm/netlogic/xlp-hal/iomap.h

View file

This diff is incomplete. Download the complete patch.

arch/mips/include/asm/netlogic/xlp-hal/pic.h

View file

This diff is incomplete. Download the complete patch.

arch/mips/include/asm/netlogic/xlp-hal/sys.h

View file

This diff is incomplete. Download the complete patch.

arch/mips/include/asm/netlogic/xlp-hal/xlp.h

View file

This diff is incomplete. Download the complete patch.

arch/mips/include/asm/netlogic/xlr/pic.h

View file

This diff is incomplete. Download the complete patch.

arch/mips/include/asm/octeon/octeon.h

View file

This diff is incomplete. Download the complete patch.

arch/mips/include/asm/parport.h

View before deletion

This diff is incomplete. Download the complete patch.

arch/mips/include/asm/percpu.h

View before deletion

This diff is incomplete. Download the complete patch.

arch/mips/include/asm/scatterlist.h

View before deletion

This diff is incomplete. Download the complete patch.

arch/mips/include/asm/sections.h

View before deletion

This diff is incomplete. Download the complete patch.

arch/mips/include/asm/segment.h

View before deletion

This diff is incomplete. Download the complete patch.

arch/mips/include/asm/serial.h

View before deletion

This diff is incomplete. Download the complete patch.

arch/mips/include/asm/ucontext.h

View before deletion

This diff is incomplete. Download the complete patch.

arch/mips/include/asm/xor.h

View before deletion

This diff is incomplete. Download the complete patch.

arch/mips/include/uapi/asm/Kbuild

View file

This diff is incomplete. Download the complete patch.

arch/mips/include/uapi/asm/auxvec.h

View before deletion

This diff is incomplete. Download the complete patch.

arch/mips/include/uapi/asm/ipcbuf.h

View before deletion

This diff is incomplete. Download the complete patch.

arch/mips/kernel/cpu-probe.c

View file

This diff is incomplete. Download the complete patch.

arch/mips/kernel/csrc-ioasic.c

View file

This diff is incomplete. Download the complete patch.

arch/mips/kernel/idle.c

View file

This diff is incomplete. Download the complete patch.

arch/mips/kernel/mcount.S

View file

This diff is incomplete. Download the complete patch.

arch/mips/kernel/relocate_kernel.S

View file

This diff is incomplete. Download the complete patch.

arch/mips/kernel/setup.c

View file

This diff is incomplete. Download the complete patch.

arch/mips/kernel/time.c

View file

This diff is incomplete. Download the complete patch.

arch/mips/kernel/vmlinux.lds.S

View file

This diff is incomplete. Download the complete patch.

arch/mips/lantiq/falcon/sysctrl.c

View file

This diff is incomplete. Download the complete patch.

arch/mips/lantiq/xway/Makefile

View file

This diff is incomplete. Download the complete patch.

arch/mips/lantiq/xway/dcdc.c

View file

This diff is incomplete. Download the complete patch.

arch/mips/lasat/image/Makefile

View file

This diff is incomplete. Download the complete patch.

arch/mips/loongson/common/Makefile

View file

This diff is incomplete. Download the complete patch.

arch/mips/math-emu/cp1emu.c

View file

This diff is incomplete. Download the complete patch.

arch/mips/mm/c-octeon.c

View file

This diff is incomplete. Download the complete patch.

arch/mips/mm/dma-default.c

View file

This diff is incomplete. Download the complete patch.

arch/mips/mm/gup.c

View file

This diff is incomplete. Download the complete patch.

arch/mips/mm/init.c

View file

This diff is incomplete. Download the complete patch.

arch/mips/mm/tlb-funcs.S

View file

This diff is incomplete. Download the complete patch.

arch/mips/mm/tlbex.c

View file

This diff is incomplete. Download the complete patch.

arch/mips/netlogic/Kconfig

View file

This diff is incomplete. Download the complete patch.

arch/mips/netlogic/common/smp.c

View file

This diff is incomplete. Download the complete patch.

arch/mips/netlogic/common/time.c

View file

This diff is incomplete. Download the complete patch.

arch/mips/netlogic/dts/Makefile

View file

This diff is incomplete. Download the complete patch.

arch/mips/netlogic/dts/xlp_evp.dts

View file

This diff is incomplete. Download the complete patch.

arch/mips/netlogic/dts/xlp_fvp.dts

View file

This diff is incomplete. Download the complete patch.

arch/mips/netlogic/dts/xlp_svp.dts

View file

This diff is incomplete. Download the complete patch.

arch/mips/netlogic/xlp/Makefile

View file

This diff is incomplete. Download the complete patch.

arch/mips/netlogic/xlp/dt.c

View file

This diff is incomplete. Download the complete patch.

arch/mips/netlogic/xlp/nlm_hal.c

View file

This diff is incomplete. Download the complete patch.

arch/mips/netlogic/xlp/setup.c

View file

This diff is incomplete. Download the complete patch.

arch/mips/netlogic/xlp/usb-init-xlp2.c

View file

This diff is incomplete. Download the complete patch.

arch/mips/netlogic/xlp/usb-init.c

View file

This diff is incomplete. Download the complete patch.

arch/mips/netlogic/xlp/wakeup.c

View file

This diff is incomplete. Download the complete patch.

arch/mips/pci/Makefile

View file

This diff is incomplete. Download the complete patch.

arch/mips/pci/pci-octeon.c

View file

This diff is incomplete. Download the complete patch.

arch/mips/pci/pci-rt3883.c

View file

This diff is incomplete. Download the complete patch.

arch/mips/powertv/Kconfig

View file

This diff is incomplete. Download the complete patch.

arch/mips/powertv/asic/asic_devices.c

View file

This diff is incomplete. Download the complete patch.

arch/mips/powertv/init.c

View file

This diff is incomplete. Download the complete patch.

arch/mips/powertv/reset.c

View file

This diff is incomplete. Download the complete patch.

arch/mips/ralink/Kconfig

View file

This diff is incomplete. Download the complete patch.

arch/mips/ralink/Makefile

View file

This diff is incomplete. Download the complete patch.

arch/mips/ralink/Platform

View file

This diff is incomplete. Download the complete patch.

arch/mips/ralink/cevt-rt3352.c

View file

This diff is incomplete. Download the complete patch.

arch/mips/ralink/clk.c

View file

This diff is incomplete. Download the complete patch.

arch/mips/ralink/common.h

View file

This diff is incomplete. Download the complete patch.

arch/mips/ralink/mt7620.c

View file

This diff is incomplete. Download the complete patch.

arch/mips/ralink/of.c

View file

This diff is incomplete. Download the complete patch.

arch/mips/ralink/reset.c

View file

This diff is incomplete. Download the complete patch.

arch/mips/ralink/timer.c

View file

This diff is incomplete. Download the complete patch.

arch/mips/txx9/generic/setup.c

View file

This diff is incomplete. Download the complete patch.

drivers/gpio/Kconfig

View file

This diff is incomplete. Download the complete patch.

drivers/gpio/Makefile

View file

This diff is incomplete. Download the complete patch.

drivers/gpio/gpio-octeon.c

View file

This diff is incomplete. Download the complete patch.

scripts/package/buildtar

View file

This diff is incomplete. Download the complete patch.