Loading MAINTAINERS +2 −0 Original line number Diff line number Diff line Loading @@ -584,6 +584,8 @@ L: linux-arm-kernel@lists.arm.linux.org.uk (subscribers-only) S: Maintained ARM/TOSA MACHINE SUPPORT P: Dmitry Baryshkov M: dbaryshkov@gmail.com P: Dirk Opfer M: dirk@opfer-online.de S: Maintained Loading arch/arm/mach-pxa/Kconfig +9 −0 Original line number Diff line number Diff line Loading @@ -310,4 +310,13 @@ config PXA_PWM default BACKLIGHT_PWM help Enable support for PXA2xx/PXA3xx PWM controllers config TOSA_BT tristate "Control the state of built-in bluetooth chip on Sharp SL-6000" depends on MACH_TOSA select RFKILL help This is a simple driver that is able to control the state of built in bluetooth chip on tosa. endif arch/arm/mach-pxa/Makefile +3 −1 Original line number Diff line number Diff line Loading @@ -4,7 +4,7 @@ # Common support (must be linked before board specific support) obj-y += clock.o devices.o generic.o irq.o dma.o \ time.o gpio.o time.o gpio.o reset.o obj-$(CONFIG_PM) += pm.o sleep.o standby.o obj-$(CONFIG_CPU_FREQ) += cpu-pxa.o Loading Loading @@ -61,3 +61,5 @@ obj-$(CONFIG_LEDS) += $(led-y) ifeq ($(CONFIG_PCI),y) obj-$(CONFIG_MACH_ARMCORE) += cm-x270-pci.o endif obj-$(CONFIG_TOSA_BT) += tosa-bt.o arch/arm/mach-pxa/reset.c 0 → 100644 +96 −0 Original line number Diff line number Diff line /* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. */ #include <linux/kernel.h> #include <linux/module.h> #include <linux/delay.h> #include <linux/gpio.h> #include <asm/io.h> #include <asm/proc-fns.h> #include <asm/arch/pxa-regs.h> #include <asm/arch/pxa2xx-regs.h> static void do_hw_reset(void); static int reset_gpio = -1; int init_gpio_reset(int gpio) { int rc; rc = gpio_request(gpio, "reset generator"); if (rc) { printk(KERN_ERR "Can't request reset_gpio\n"); goto out; } rc = gpio_direction_input(gpio); if (rc) { printk(KERN_ERR "Can't configure reset_gpio for input\n"); gpio_free(gpio); goto out; } out: if (!rc) reset_gpio = gpio; return rc; } /* * Trigger GPIO reset. * This covers various types of logic connecting gpio pin * to RESET pins (nRESET or GPIO_RESET): */ static void do_gpio_reset(void) { BUG_ON(reset_gpio == -1); /* drive it low */ gpio_direction_output(reset_gpio, 0); mdelay(2); /* rising edge or drive high */ gpio_set_value(reset_gpio, 1); mdelay(2); /* falling edge */ gpio_set_value(reset_gpio, 0); /* give it some time */ mdelay(10); WARN_ON(1); /* fallback */ do_hw_reset(); } static void do_hw_reset(void) { /* Initialize the watchdog and let it fire */ OWER = OWER_WME; OSSR = OSSR_M3; OSMR3 = OSCR + 368640; /* ... in 100 ms */ } void arch_reset(char mode) { if (cpu_is_pxa2xx()) RCSR = RCSR_HWR | RCSR_WDR | RCSR_SMR | RCSR_GPR; switch (mode) { case 's': /* Jump into ROM at address 0 */ cpu_reset(0); break; case 'h': do_hw_reset(); break; case 'g': do_gpio_reset(); break; } } arch/arm/mach-pxa/spitz.c +3 −5 Original line number Diff line number Diff line Loading @@ -38,6 +38,7 @@ #include <asm/arch/pxa-regs.h> #include <asm/arch/pxa2xx-regs.h> #include <asm/arch/pxa2xx-gpio.h> #include <asm/arch/pxa27x-udc.h> #include <asm/arch/irda.h> #include <asm/arch/mmc.h> #include <asm/arch/ohci.h> Loading Loading @@ -529,11 +530,7 @@ static struct platform_device *devices[] __initdata = { static void spitz_poweroff(void) { pxa_gpio_mode(SPITZ_GPIO_ON_RESET | GPIO_OUT); GPSR(SPITZ_GPIO_ON_RESET) = GPIO_bit(SPITZ_GPIO_ON_RESET); mdelay(1000); arm_machine_restart('h'); arm_machine_restart('g'); } static void spitz_restart(char mode) Loading @@ -547,6 +544,7 @@ static void spitz_restart(char mode) static void __init common_init(void) { init_gpio_reset(SPITZ_GPIO_ON_RESET); pm_power_off = spitz_poweroff; arm_pm_restart = spitz_restart; Loading Loading
MAINTAINERS +2 −0 Original line number Diff line number Diff line Loading @@ -584,6 +584,8 @@ L: linux-arm-kernel@lists.arm.linux.org.uk (subscribers-only) S: Maintained ARM/TOSA MACHINE SUPPORT P: Dmitry Baryshkov M: dbaryshkov@gmail.com P: Dirk Opfer M: dirk@opfer-online.de S: Maintained Loading
arch/arm/mach-pxa/Kconfig +9 −0 Original line number Diff line number Diff line Loading @@ -310,4 +310,13 @@ config PXA_PWM default BACKLIGHT_PWM help Enable support for PXA2xx/PXA3xx PWM controllers config TOSA_BT tristate "Control the state of built-in bluetooth chip on Sharp SL-6000" depends on MACH_TOSA select RFKILL help This is a simple driver that is able to control the state of built in bluetooth chip on tosa. endif
arch/arm/mach-pxa/Makefile +3 −1 Original line number Diff line number Diff line Loading @@ -4,7 +4,7 @@ # Common support (must be linked before board specific support) obj-y += clock.o devices.o generic.o irq.o dma.o \ time.o gpio.o time.o gpio.o reset.o obj-$(CONFIG_PM) += pm.o sleep.o standby.o obj-$(CONFIG_CPU_FREQ) += cpu-pxa.o Loading Loading @@ -61,3 +61,5 @@ obj-$(CONFIG_LEDS) += $(led-y) ifeq ($(CONFIG_PCI),y) obj-$(CONFIG_MACH_ARMCORE) += cm-x270-pci.o endif obj-$(CONFIG_TOSA_BT) += tosa-bt.o
arch/arm/mach-pxa/reset.c 0 → 100644 +96 −0 Original line number Diff line number Diff line /* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. */ #include <linux/kernel.h> #include <linux/module.h> #include <linux/delay.h> #include <linux/gpio.h> #include <asm/io.h> #include <asm/proc-fns.h> #include <asm/arch/pxa-regs.h> #include <asm/arch/pxa2xx-regs.h> static void do_hw_reset(void); static int reset_gpio = -1; int init_gpio_reset(int gpio) { int rc; rc = gpio_request(gpio, "reset generator"); if (rc) { printk(KERN_ERR "Can't request reset_gpio\n"); goto out; } rc = gpio_direction_input(gpio); if (rc) { printk(KERN_ERR "Can't configure reset_gpio for input\n"); gpio_free(gpio); goto out; } out: if (!rc) reset_gpio = gpio; return rc; } /* * Trigger GPIO reset. * This covers various types of logic connecting gpio pin * to RESET pins (nRESET or GPIO_RESET): */ static void do_gpio_reset(void) { BUG_ON(reset_gpio == -1); /* drive it low */ gpio_direction_output(reset_gpio, 0); mdelay(2); /* rising edge or drive high */ gpio_set_value(reset_gpio, 1); mdelay(2); /* falling edge */ gpio_set_value(reset_gpio, 0); /* give it some time */ mdelay(10); WARN_ON(1); /* fallback */ do_hw_reset(); } static void do_hw_reset(void) { /* Initialize the watchdog and let it fire */ OWER = OWER_WME; OSSR = OSSR_M3; OSMR3 = OSCR + 368640; /* ... in 100 ms */ } void arch_reset(char mode) { if (cpu_is_pxa2xx()) RCSR = RCSR_HWR | RCSR_WDR | RCSR_SMR | RCSR_GPR; switch (mode) { case 's': /* Jump into ROM at address 0 */ cpu_reset(0); break; case 'h': do_hw_reset(); break; case 'g': do_gpio_reset(); break; } }
arch/arm/mach-pxa/spitz.c +3 −5 Original line number Diff line number Diff line Loading @@ -38,6 +38,7 @@ #include <asm/arch/pxa-regs.h> #include <asm/arch/pxa2xx-regs.h> #include <asm/arch/pxa2xx-gpio.h> #include <asm/arch/pxa27x-udc.h> #include <asm/arch/irda.h> #include <asm/arch/mmc.h> #include <asm/arch/ohci.h> Loading Loading @@ -529,11 +530,7 @@ static struct platform_device *devices[] __initdata = { static void spitz_poweroff(void) { pxa_gpio_mode(SPITZ_GPIO_ON_RESET | GPIO_OUT); GPSR(SPITZ_GPIO_ON_RESET) = GPIO_bit(SPITZ_GPIO_ON_RESET); mdelay(1000); arm_machine_restart('h'); arm_machine_restart('g'); } static void spitz_restart(char mode) Loading @@ -547,6 +544,7 @@ static void spitz_restart(char mode) static void __init common_init(void) { init_gpio_reset(SPITZ_GPIO_ON_RESET); pm_power_off = spitz_poweroff; arm_pm_restart = spitz_restart; Loading