mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-20 10:44:23 +08:00
Merge branch 'rmobile-fixes-for-linus' into rmobile-latest
This commit is contained in:
commit
17f0056e6a
2
.mailmap
2
.mailmap
@ -68,6 +68,7 @@ Juha Yrjola <juha.yrjola@solidboot.com>
|
|||||||
Kay Sievers <kay.sievers@vrfy.org>
|
Kay Sievers <kay.sievers@vrfy.org>
|
||||||
Kenneth W Chen <kenneth.w.chen@intel.com>
|
Kenneth W Chen <kenneth.w.chen@intel.com>
|
||||||
Koushik <raghavendra.koushik@neterion.com>
|
Koushik <raghavendra.koushik@neterion.com>
|
||||||
|
Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
|
||||||
Leonid I Ananiev <leonid.i.ananiev@intel.com>
|
Leonid I Ananiev <leonid.i.ananiev@intel.com>
|
||||||
Linas Vepstas <linas@austin.ibm.com>
|
Linas Vepstas <linas@austin.ibm.com>
|
||||||
Mark Brown <broonie@sirena.org.uk>
|
Mark Brown <broonie@sirena.org.uk>
|
||||||
@ -111,3 +112,4 @@ Uwe Kleine-König <ukl@pengutronix.de>
|
|||||||
Uwe Kleine-König <Uwe.Kleine-Koenig@digi.com>
|
Uwe Kleine-König <Uwe.Kleine-Koenig@digi.com>
|
||||||
Valdis Kletnieks <Valdis.Kletnieks@vt.edu>
|
Valdis Kletnieks <Valdis.Kletnieks@vt.edu>
|
||||||
Takashi YOSHII <takashi.yoshii.zj@renesas.com>
|
Takashi YOSHII <takashi.yoshii.zj@renesas.com>
|
||||||
|
Yusuke Goda <goda.yusuke@renesas.com>
|
||||||
|
@ -349,6 +349,7 @@ STAC92HD83*
|
|||||||
ref Reference board
|
ref Reference board
|
||||||
mic-ref Reference board with power management for ports
|
mic-ref Reference board with power management for ports
|
||||||
dell-s14 Dell laptop
|
dell-s14 Dell laptop
|
||||||
|
dell-vostro-3500 Dell Vostro 3500 laptop
|
||||||
hp HP laptops with (inverted) mute-LED
|
hp HP laptops with (inverted) mute-LED
|
||||||
hp-dv7-4000 HP dv-7 4000
|
hp-dv7-4000 HP dv-7 4000
|
||||||
auto BIOS setup (default)
|
auto BIOS setup (default)
|
||||||
|
@ -579,7 +579,7 @@ Development Tree
|
|||||||
~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~
|
||||||
The latest development codes for HD-audio are found on sound git tree:
|
The latest development codes for HD-audio are found on sound git tree:
|
||||||
|
|
||||||
- git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6.git
|
- git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git
|
||||||
|
|
||||||
The master branch or for-next branches can be used as the main
|
The master branch or for-next branches can be used as the main
|
||||||
development branches in general while the HD-audio specific patches
|
development branches in general while the HD-audio specific patches
|
||||||
@ -594,7 +594,7 @@ is, installed via the usual spells: configure, make and make
|
|||||||
install(-modules). See INSTALL in the package. The snapshot tarballs
|
install(-modules). See INSTALL in the package. The snapshot tarballs
|
||||||
are found at:
|
are found at:
|
||||||
|
|
||||||
- ftp://ftp.kernel.org/pub/linux/kernel/people/tiwai/snapshot/
|
- ftp://ftp.suse.com/pub/people/tiwai/snapshot/
|
||||||
|
|
||||||
|
|
||||||
Sending a Bug Report
|
Sending a Bug Report
|
||||||
@ -696,7 +696,7 @@ via hda-verb won't change the mixer value.
|
|||||||
|
|
||||||
The hda-verb program is found in the ftp directory:
|
The hda-verb program is found in the ftp directory:
|
||||||
|
|
||||||
- ftp://ftp.kernel.org/pub/linux/kernel/people/tiwai/misc/
|
- ftp://ftp.suse.com/pub/people/tiwai/misc/
|
||||||
|
|
||||||
Also a git repository is available:
|
Also a git repository is available:
|
||||||
|
|
||||||
@ -764,7 +764,7 @@ operation, the jack plugging simulation, etc.
|
|||||||
|
|
||||||
The package is found in:
|
The package is found in:
|
||||||
|
|
||||||
- ftp://ftp.kernel.org/pub/linux/kernel/people/tiwai/misc/
|
- ftp://ftp.suse.com/pub/people/tiwai/misc/
|
||||||
|
|
||||||
A git repository is available:
|
A git repository is available:
|
||||||
|
|
||||||
|
2
Kbuild
2
Kbuild
@ -92,7 +92,7 @@ always += missing-syscalls
|
|||||||
targets += missing-syscalls
|
targets += missing-syscalls
|
||||||
|
|
||||||
quiet_cmd_syscalls = CALL $<
|
quiet_cmd_syscalls = CALL $<
|
||||||
cmd_syscalls = $(CONFIG_SHELL) $< $(CC) $(c_flags)
|
cmd_syscalls = $(CONFIG_SHELL) $< $(CC) $(c_flags) $(missing_syscalls_flags)
|
||||||
|
|
||||||
missing-syscalls: scripts/checksyscalls.sh $(offsets-file) FORCE
|
missing-syscalls: scripts/checksyscalls.sh $(offsets-file) FORCE
|
||||||
$(call cmd,syscalls)
|
$(call cmd,syscalls)
|
||||||
|
14
MAINTAINERS
14
MAINTAINERS
@ -1106,6 +1106,7 @@ F: drivers/media/video/s5p-fimc/
|
|||||||
ARM/SAMSUNG S5P SERIES Multi Format Codec (MFC) SUPPORT
|
ARM/SAMSUNG S5P SERIES Multi Format Codec (MFC) SUPPORT
|
||||||
M: Kyungmin Park <kyungmin.park@samsung.com>
|
M: Kyungmin Park <kyungmin.park@samsung.com>
|
||||||
M: Kamil Debski <k.debski@samsung.com>
|
M: Kamil Debski <k.debski@samsung.com>
|
||||||
|
M: Jeongtae Park <jtp.park@samsung.com>
|
||||||
L: linux-arm-kernel@lists.infradead.org
|
L: linux-arm-kernel@lists.infradead.org
|
||||||
L: linux-media@vger.kernel.org
|
L: linux-media@vger.kernel.org
|
||||||
S: Maintained
|
S: Maintained
|
||||||
@ -1929,6 +1930,7 @@ CONTROL GROUPS (CGROUPS)
|
|||||||
M: Paul Menage <paul@paulmenage.org>
|
M: Paul Menage <paul@paulmenage.org>
|
||||||
M: Li Zefan <lizf@cn.fujitsu.com>
|
M: Li Zefan <lizf@cn.fujitsu.com>
|
||||||
L: containers@lists.linux-foundation.org
|
L: containers@lists.linux-foundation.org
|
||||||
|
L: cgroups@vger.kernel.org
|
||||||
S: Maintained
|
S: Maintained
|
||||||
F: include/linux/cgroup*
|
F: include/linux/cgroup*
|
||||||
F: kernel/cgroup*
|
F: kernel/cgroup*
|
||||||
@ -2342,6 +2344,13 @@ S: Supported
|
|||||||
F: drivers/gpu/drm/i915
|
F: drivers/gpu/drm/i915
|
||||||
F: include/drm/i915*
|
F: include/drm/i915*
|
||||||
|
|
||||||
|
DRM DRIVERS FOR EXYNOS
|
||||||
|
M: Inki Dae <inki.dae@samsung.com>
|
||||||
|
L: dri-devel@lists.freedesktop.org
|
||||||
|
S: Supported
|
||||||
|
F: drivers/gpu/drm/exynos
|
||||||
|
F: include/drm/exynos*
|
||||||
|
|
||||||
DSCC4 DRIVER
|
DSCC4 DRIVER
|
||||||
M: Francois Romieu <romieu@fr.zoreil.com>
|
M: Francois Romieu <romieu@fr.zoreil.com>
|
||||||
L: netdev@vger.kernel.org
|
L: netdev@vger.kernel.org
|
||||||
@ -4296,6 +4305,7 @@ MEMORY RESOURCE CONTROLLER
|
|||||||
M: Balbir Singh <bsingharora@gmail.com>
|
M: Balbir Singh <bsingharora@gmail.com>
|
||||||
M: Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp>
|
M: Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp>
|
||||||
M: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
|
M: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
|
||||||
|
L: cgroups@vger.kernel.org
|
||||||
L: linux-mm@kvack.org
|
L: linux-mm@kvack.org
|
||||||
S: Maintained
|
S: Maintained
|
||||||
F: mm/memcontrol.c
|
F: mm/memcontrol.c
|
||||||
@ -4329,7 +4339,7 @@ MIPS
|
|||||||
M: Ralf Baechle <ralf@linux-mips.org>
|
M: Ralf Baechle <ralf@linux-mips.org>
|
||||||
L: linux-mips@linux-mips.org
|
L: linux-mips@linux-mips.org
|
||||||
W: http://www.linux-mips.org/
|
W: http://www.linux-mips.org/
|
||||||
T: git git://git.linux-mips.org/pub/scm/linux.git
|
T: git git://git.linux-mips.org/pub/scm/ralf/linux.git
|
||||||
Q: http://patchwork.linux-mips.org/project/linux-mips/list/
|
Q: http://patchwork.linux-mips.org/project/linux-mips/list/
|
||||||
S: Supported
|
S: Supported
|
||||||
F: Documentation/mips/
|
F: Documentation/mips/
|
||||||
@ -6122,7 +6132,7 @@ F: sound/
|
|||||||
SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEMENT (ASoC)
|
SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEMENT (ASoC)
|
||||||
M: Liam Girdwood <lrg@ti.com>
|
M: Liam Girdwood <lrg@ti.com>
|
||||||
M: Mark Brown <broonie@opensource.wolfsonmicro.com>
|
M: Mark Brown <broonie@opensource.wolfsonmicro.com>
|
||||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound-2.6.git
|
T: git git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
|
||||||
L: alsa-devel@alsa-project.org (moderated for non-subscribers)
|
L: alsa-devel@alsa-project.org (moderated for non-subscribers)
|
||||||
W: http://alsa-project.org/main/index.php/ASoC
|
W: http://alsa-project.org/main/index.php/ASoC
|
||||||
S: Supported
|
S: Supported
|
||||||
|
2
Makefile
2
Makefile
@ -1,7 +1,7 @@
|
|||||||
VERSION = 3
|
VERSION = 3
|
||||||
PATCHLEVEL = 2
|
PATCHLEVEL = 2
|
||||||
SUBLEVEL = 0
|
SUBLEVEL = 0
|
||||||
EXTRAVERSION = -rc1
|
EXTRAVERSION = -rc2
|
||||||
NAME = Saber-toothed Squirrel
|
NAME = Saber-toothed Squirrel
|
||||||
|
|
||||||
# *DOCUMENTATION*
|
# *DOCUMENTATION*
|
||||||
|
@ -22,11 +22,10 @@
|
|||||||
sdhci@c8000400 {
|
sdhci@c8000400 {
|
||||||
cd-gpios = <&gpio 69 0>; /* gpio PI5 */
|
cd-gpios = <&gpio 69 0>; /* gpio PI5 */
|
||||||
wp-gpios = <&gpio 57 0>; /* gpio PH1 */
|
wp-gpios = <&gpio 57 0>; /* gpio PH1 */
|
||||||
power-gpios = <&gpio 155 0>; /* gpio PT3 */
|
power-gpios = <&gpio 70 0>; /* gpio PI6 */
|
||||||
};
|
};
|
||||||
|
|
||||||
sdhci@c8000600 {
|
sdhci@c8000600 {
|
||||||
power-gpios = <&gpio 70 0>; /* gpio PI6 */
|
|
||||||
support-8bit;
|
support-8bit;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -98,7 +98,7 @@ void __init at91_add_device_usbh(struct at91_usbh_data *data) {}
|
|||||||
* USB HS Device (Gadget)
|
* USB HS Device (Gadget)
|
||||||
* -------------------------------------------------------------------- */
|
* -------------------------------------------------------------------- */
|
||||||
|
|
||||||
#if defined(CONFIG_USB_GADGET_ATMEL_USBA) || defined(CONFIG_USB_GADGET_ATMEL_USBA_MODULE)
|
#if defined(CONFIG_USB_ATMEL_USBA) || defined(CONFIG_USB_ATMEL_USBA_MODULE)
|
||||||
|
|
||||||
static struct resource usba_udc_resources[] = {
|
static struct resource usba_udc_resources[] = {
|
||||||
[0] = {
|
[0] = {
|
||||||
@ -1021,8 +1021,8 @@ void __init at91_add_device_ssc(unsigned id, unsigned pins) {}
|
|||||||
#if defined(CONFIG_SERIAL_ATMEL)
|
#if defined(CONFIG_SERIAL_ATMEL)
|
||||||
static struct resource dbgu_resources[] = {
|
static struct resource dbgu_resources[] = {
|
||||||
[0] = {
|
[0] = {
|
||||||
.start = AT91_VA_BASE_SYS + AT91_DBGU,
|
.start = AT91_BASE_SYS + AT91_DBGU,
|
||||||
.end = AT91_VA_BASE_SYS + AT91_DBGU + SZ_512 - 1,
|
.end = AT91_BASE_SYS + AT91_DBGU + SZ_512 - 1,
|
||||||
.flags = IORESOURCE_MEM,
|
.flags = IORESOURCE_MEM,
|
||||||
},
|
},
|
||||||
[1] = {
|
[1] = {
|
||||||
@ -1035,7 +1035,6 @@ static struct resource dbgu_resources[] = {
|
|||||||
static struct atmel_uart_data dbgu_data = {
|
static struct atmel_uart_data dbgu_data = {
|
||||||
.use_dma_tx = 0,
|
.use_dma_tx = 0,
|
||||||
.use_dma_rx = 0, /* DBGU not capable of receive DMA */
|
.use_dma_rx = 0, /* DBGU not capable of receive DMA */
|
||||||
.regs = (void __iomem *)(AT91_VA_BASE_SYS + AT91_DBGU),
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static u64 dbgu_dmamask = DMA_BIT_MASK(32);
|
static u64 dbgu_dmamask = DMA_BIT_MASK(32);
|
||||||
|
@ -877,8 +877,8 @@ void __init at91_add_device_ssc(unsigned id, unsigned pins) {}
|
|||||||
#if defined(CONFIG_SERIAL_ATMEL)
|
#if defined(CONFIG_SERIAL_ATMEL)
|
||||||
static struct resource dbgu_resources[] = {
|
static struct resource dbgu_resources[] = {
|
||||||
[0] = {
|
[0] = {
|
||||||
.start = AT91_VA_BASE_SYS + AT91_DBGU,
|
.start = AT91_BASE_SYS + AT91_DBGU,
|
||||||
.end = AT91_VA_BASE_SYS + AT91_DBGU + SZ_512 - 1,
|
.end = AT91_BASE_SYS + AT91_DBGU + SZ_512 - 1,
|
||||||
.flags = IORESOURCE_MEM,
|
.flags = IORESOURCE_MEM,
|
||||||
},
|
},
|
||||||
[1] = {
|
[1] = {
|
||||||
@ -891,7 +891,6 @@ static struct resource dbgu_resources[] = {
|
|||||||
static struct atmel_uart_data dbgu_data = {
|
static struct atmel_uart_data dbgu_data = {
|
||||||
.use_dma_tx = 0,
|
.use_dma_tx = 0,
|
||||||
.use_dma_rx = 0, /* DBGU not capable of receive DMA */
|
.use_dma_rx = 0, /* DBGU not capable of receive DMA */
|
||||||
.regs = (void __iomem *)(AT91_VA_BASE_SYS + AT91_DBGU),
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static u64 dbgu_dmamask = DMA_BIT_MASK(32);
|
static u64 dbgu_dmamask = DMA_BIT_MASK(32);
|
||||||
|
@ -837,8 +837,8 @@ void __init at91_add_device_ssc(unsigned id, unsigned pins) {}
|
|||||||
#if defined(CONFIG_SERIAL_ATMEL)
|
#if defined(CONFIG_SERIAL_ATMEL)
|
||||||
static struct resource dbgu_resources[] = {
|
static struct resource dbgu_resources[] = {
|
||||||
[0] = {
|
[0] = {
|
||||||
.start = AT91_VA_BASE_SYS + AT91_DBGU,
|
.start = AT91_BASE_SYS + AT91_DBGU,
|
||||||
.end = AT91_VA_BASE_SYS + AT91_DBGU + SZ_512 - 1,
|
.end = AT91_BASE_SYS + AT91_DBGU + SZ_512 - 1,
|
||||||
.flags = IORESOURCE_MEM,
|
.flags = IORESOURCE_MEM,
|
||||||
},
|
},
|
||||||
[1] = {
|
[1] = {
|
||||||
@ -851,7 +851,6 @@ static struct resource dbgu_resources[] = {
|
|||||||
static struct atmel_uart_data dbgu_data = {
|
static struct atmel_uart_data dbgu_data = {
|
||||||
.use_dma_tx = 0,
|
.use_dma_tx = 0,
|
||||||
.use_dma_rx = 0, /* DBGU not capable of receive DMA */
|
.use_dma_rx = 0, /* DBGU not capable of receive DMA */
|
||||||
.regs = (void __iomem *)(AT91_VA_BASE_SYS + AT91_DBGU),
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static u64 dbgu_dmamask = DMA_BIT_MASK(32);
|
static u64 dbgu_dmamask = DMA_BIT_MASK(32);
|
||||||
|
@ -816,8 +816,8 @@ void __init at91_add_device_ssc(unsigned id, unsigned pins) {}
|
|||||||
#if defined(CONFIG_SERIAL_ATMEL)
|
#if defined(CONFIG_SERIAL_ATMEL)
|
||||||
static struct resource dbgu_resources[] = {
|
static struct resource dbgu_resources[] = {
|
||||||
[0] = {
|
[0] = {
|
||||||
.start = AT91_VA_BASE_SYS + AT91_DBGU,
|
.start = AT91_BASE_SYS + AT91_DBGU,
|
||||||
.end = AT91_VA_BASE_SYS + AT91_DBGU + SZ_512 - 1,
|
.end = AT91_BASE_SYS + AT91_DBGU + SZ_512 - 1,
|
||||||
.flags = IORESOURCE_MEM,
|
.flags = IORESOURCE_MEM,
|
||||||
},
|
},
|
||||||
[1] = {
|
[1] = {
|
||||||
@ -830,7 +830,6 @@ static struct resource dbgu_resources[] = {
|
|||||||
static struct atmel_uart_data dbgu_data = {
|
static struct atmel_uart_data dbgu_data = {
|
||||||
.use_dma_tx = 0,
|
.use_dma_tx = 0,
|
||||||
.use_dma_rx = 0, /* DBGU not capable of receive DMA */
|
.use_dma_rx = 0, /* DBGU not capable of receive DMA */
|
||||||
.regs = (void __iomem *)(AT91_VA_BASE_SYS + AT91_DBGU),
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static u64 dbgu_dmamask = DMA_BIT_MASK(32);
|
static u64 dbgu_dmamask = DMA_BIT_MASK(32);
|
||||||
|
@ -1196,8 +1196,8 @@ void __init at91_add_device_ssc(unsigned id, unsigned pins) {}
|
|||||||
|
|
||||||
static struct resource dbgu_resources[] = {
|
static struct resource dbgu_resources[] = {
|
||||||
[0] = {
|
[0] = {
|
||||||
.start = AT91_VA_BASE_SYS + AT91_DBGU,
|
.start = AT91_BASE_SYS + AT91_DBGU,
|
||||||
.end = AT91_VA_BASE_SYS + AT91_DBGU + SZ_512 - 1,
|
.end = AT91_BASE_SYS + AT91_DBGU + SZ_512 - 1,
|
||||||
.flags = IORESOURCE_MEM,
|
.flags = IORESOURCE_MEM,
|
||||||
},
|
},
|
||||||
[1] = {
|
[1] = {
|
||||||
@ -1210,7 +1210,6 @@ static struct resource dbgu_resources[] = {
|
|||||||
static struct atmel_uart_data dbgu_data = {
|
static struct atmel_uart_data dbgu_data = {
|
||||||
.use_dma_tx = 0,
|
.use_dma_tx = 0,
|
||||||
.use_dma_rx = 0, /* DBGU not capable of receive DMA */
|
.use_dma_rx = 0, /* DBGU not capable of receive DMA */
|
||||||
.regs = (void __iomem *)(AT91_VA_BASE_SYS + AT91_DBGU),
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static u64 dbgu_dmamask = DMA_BIT_MASK(32);
|
static u64 dbgu_dmamask = DMA_BIT_MASK(32);
|
||||||
|
@ -197,7 +197,7 @@ void __init at91_add_device_usbh_ehci(struct at91_usbh_data *data) {}
|
|||||||
* USB HS Device (Gadget)
|
* USB HS Device (Gadget)
|
||||||
* -------------------------------------------------------------------- */
|
* -------------------------------------------------------------------- */
|
||||||
|
|
||||||
#if defined(CONFIG_USB_GADGET_ATMEL_USBA) || defined(CONFIG_USB_GADGET_ATMEL_USBA_MODULE)
|
#if defined(CONFIG_USB_ATMEL_USBA) || defined(CONFIG_USB_ATMEL_USBA_MODULE)
|
||||||
static struct resource usba_udc_resources[] = {
|
static struct resource usba_udc_resources[] = {
|
||||||
[0] = {
|
[0] = {
|
||||||
.start = AT91SAM9G45_UDPHS_FIFO,
|
.start = AT91SAM9G45_UDPHS_FIFO,
|
||||||
@ -1332,8 +1332,8 @@ void __init at91_add_device_ssc(unsigned id, unsigned pins) {}
|
|||||||
#if defined(CONFIG_SERIAL_ATMEL)
|
#if defined(CONFIG_SERIAL_ATMEL)
|
||||||
static struct resource dbgu_resources[] = {
|
static struct resource dbgu_resources[] = {
|
||||||
[0] = {
|
[0] = {
|
||||||
.start = AT91_VA_BASE_SYS + AT91_DBGU,
|
.start = AT91_BASE_SYS + AT91_DBGU,
|
||||||
.end = AT91_VA_BASE_SYS + AT91_DBGU + SZ_512 - 1,
|
.end = AT91_BASE_SYS + AT91_DBGU + SZ_512 - 1,
|
||||||
.flags = IORESOURCE_MEM,
|
.flags = IORESOURCE_MEM,
|
||||||
},
|
},
|
||||||
[1] = {
|
[1] = {
|
||||||
@ -1346,7 +1346,6 @@ static struct resource dbgu_resources[] = {
|
|||||||
static struct atmel_uart_data dbgu_data = {
|
static struct atmel_uart_data dbgu_data = {
|
||||||
.use_dma_tx = 0,
|
.use_dma_tx = 0,
|
||||||
.use_dma_rx = 0,
|
.use_dma_rx = 0,
|
||||||
.regs = (void __iomem *)(AT91_VA_BASE_SYS + AT91_DBGU),
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static u64 dbgu_dmamask = DMA_BIT_MASK(32);
|
static u64 dbgu_dmamask = DMA_BIT_MASK(32);
|
||||||
|
@ -75,7 +75,7 @@ void __init at91_add_device_hdmac(void) {}
|
|||||||
* USB HS Device (Gadget)
|
* USB HS Device (Gadget)
|
||||||
* -------------------------------------------------------------------- */
|
* -------------------------------------------------------------------- */
|
||||||
|
|
||||||
#if defined(CONFIG_USB_GADGET_ATMEL_USBA) || defined(CONFIG_USB_GADGET_ATMEL_USBA_MODULE)
|
#if defined(CONFIG_USB_ATMEL_USBA) || defined(CONFIG_USB_ATMEL_USBA_MODULE)
|
||||||
|
|
||||||
static struct resource usba_udc_resources[] = {
|
static struct resource usba_udc_resources[] = {
|
||||||
[0] = {
|
[0] = {
|
||||||
@ -908,8 +908,8 @@ void __init at91_add_device_ssc(unsigned id, unsigned pins) {}
|
|||||||
#if defined(CONFIG_SERIAL_ATMEL)
|
#if defined(CONFIG_SERIAL_ATMEL)
|
||||||
static struct resource dbgu_resources[] = {
|
static struct resource dbgu_resources[] = {
|
||||||
[0] = {
|
[0] = {
|
||||||
.start = AT91_VA_BASE_SYS + AT91_DBGU,
|
.start = AT91_BASE_SYS + AT91_DBGU,
|
||||||
.end = AT91_VA_BASE_SYS + AT91_DBGU + SZ_512 - 1,
|
.end = AT91_BASE_SYS + AT91_DBGU + SZ_512 - 1,
|
||||||
.flags = IORESOURCE_MEM,
|
.flags = IORESOURCE_MEM,
|
||||||
},
|
},
|
||||||
[1] = {
|
[1] = {
|
||||||
@ -922,7 +922,6 @@ static struct resource dbgu_resources[] = {
|
|||||||
static struct atmel_uart_data dbgu_data = {
|
static struct atmel_uart_data dbgu_data = {
|
||||||
.use_dma_tx = 0,
|
.use_dma_tx = 0,
|
||||||
.use_dma_rx = 0, /* DBGU not capable of receive DMA */
|
.use_dma_rx = 0, /* DBGU not capable of receive DMA */
|
||||||
.regs = (void __iomem *)(AT91_VA_BASE_SYS + AT91_DBGU),
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static u64 dbgu_dmamask = DMA_BIT_MASK(32);
|
static u64 dbgu_dmamask = DMA_BIT_MASK(32);
|
||||||
|
@ -384,7 +384,7 @@ static struct spi_board_info yl9200_spi_devices[] = {
|
|||||||
#include <video/s1d13xxxfb.h>
|
#include <video/s1d13xxxfb.h>
|
||||||
|
|
||||||
|
|
||||||
static void __init yl9200_init_video(void)
|
static void yl9200_init_video(void)
|
||||||
{
|
{
|
||||||
/* NWAIT Signal */
|
/* NWAIT Signal */
|
||||||
at91_set_A_periph(AT91_PIN_PC6, 0);
|
at91_set_A_periph(AT91_PIN_PC6, 0);
|
||||||
|
@ -21,6 +21,8 @@
|
|||||||
#ifndef __ASM_ARCH_VMALLOC_H
|
#ifndef __ASM_ARCH_VMALLOC_H
|
||||||
#define __ASM_ARCH_VMALLOC_H
|
#define __ASM_ARCH_VMALLOC_H
|
||||||
|
|
||||||
|
#include <mach/hardware.h>
|
||||||
|
|
||||||
#define VMALLOC_END (AT91_VIRT_BASE & PGDIR_MASK)
|
#define VMALLOC_END (AT91_VIRT_BASE & PGDIR_MASK)
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -1,22 +1,26 @@
|
|||||||
zreladdr-$(CONFIG_ARCH_MX1) += 0x08008000
|
zreladdr-$(CONFIG_SOC_IMX1) += 0x08008000
|
||||||
params_phys-$(CONFIG_ARCH_MX1) := 0x08000100
|
params_phys-$(CONFIG_SOC_IMX1) := 0x08000100
|
||||||
initrd_phys-$(CONFIG_ARCH_MX1) := 0x08800000
|
initrd_phys-$(CONFIG_SOC_IMX1) := 0x08800000
|
||||||
|
|
||||||
zreladdr-$(CONFIG_MACH_MX21) += 0xC0008000
|
zreladdr-$(CONFIG_SOC_IMX21) += 0xC0008000
|
||||||
params_phys-$(CONFIG_MACH_MX21) := 0xC0000100
|
params_phys-$(CONFIG_SOC_IMX21) := 0xC0000100
|
||||||
initrd_phys-$(CONFIG_MACH_MX21) := 0xC0800000
|
initrd_phys-$(CONFIG_SOC_IMX21) := 0xC0800000
|
||||||
|
|
||||||
zreladdr-$(CONFIG_ARCH_MX25) += 0x80008000
|
zreladdr-$(CONFIG_SOC_IMX25) += 0x80008000
|
||||||
params_phys-$(CONFIG_ARCH_MX25) := 0x80000100
|
params_phys-$(CONFIG_SOC_IMX25) := 0x80000100
|
||||||
initrd_phys-$(CONFIG_ARCH_MX25) := 0x80800000
|
initrd_phys-$(CONFIG_SOC_IMX25) := 0x80800000
|
||||||
|
|
||||||
zreladdr-$(CONFIG_MACH_MX27) += 0xA0008000
|
zreladdr-$(CONFIG_SOC_IMX27) += 0xA0008000
|
||||||
params_phys-$(CONFIG_MACH_MX27) := 0xA0000100
|
params_phys-$(CONFIG_SOC_IMX27) := 0xA0000100
|
||||||
initrd_phys-$(CONFIG_MACH_MX27) := 0xA0800000
|
initrd_phys-$(CONFIG_SOC_IMX27) := 0xA0800000
|
||||||
|
|
||||||
zreladdr-$(CONFIG_ARCH_MX3) += 0x80008000
|
zreladdr-$(CONFIG_SOC_IMX31) += 0x80008000
|
||||||
params_phys-$(CONFIG_ARCH_MX3) := 0x80000100
|
params_phys-$(CONFIG_SOC_IMX31) := 0x80000100
|
||||||
initrd_phys-$(CONFIG_ARCH_MX3) := 0x80800000
|
initrd_phys-$(CONFIG_SOC_IMX31) := 0x80800000
|
||||||
|
|
||||||
|
zreladdr-$(CONFIG_SOC_IMX35) += 0x80008000
|
||||||
|
params_phys-$(CONFIG_SOC_IMX35) := 0x80000100
|
||||||
|
initrd_phys-$(CONFIG_SOC_IMX35) := 0x80800000
|
||||||
|
|
||||||
zreladdr-$(CONFIG_SOC_IMX6Q) += 0x10008000
|
zreladdr-$(CONFIG_SOC_IMX6Q) += 0x10008000
|
||||||
params_phys-$(CONFIG_SOC_IMX6Q) := 0x10000100
|
params_phys-$(CONFIG_SOC_IMX6Q) := 0x10000100
|
||||||
|
@ -1139,7 +1139,7 @@ static int _clk_set_rate(struct clk *clk, unsigned long rate)
|
|||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
max_div = ((d->bm_pred >> d->bp_pred) + 1) *
|
max_div = ((d->bm_pred >> d->bp_pred) + 1) *
|
||||||
((d->bm_pred >> d->bp_pred) + 1);
|
((d->bm_podf >> d->bp_podf) + 1);
|
||||||
|
|
||||||
div = parent_rate / rate;
|
div = parent_rate / rate;
|
||||||
if (div == 0)
|
if (div == 0)
|
||||||
@ -2002,6 +2002,21 @@ int __init mx6q_clocks_init(void)
|
|||||||
clk_set_rate(&asrc_serial_clk, 1500000);
|
clk_set_rate(&asrc_serial_clk, 1500000);
|
||||||
clk_set_rate(&enfc_clk, 11000000);
|
clk_set_rate(&enfc_clk, 11000000);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Before pinctrl API is available, we have to rely on the pad
|
||||||
|
* configuration set up by bootloader. For usdhc example here,
|
||||||
|
* u-boot sets up the pads for 49.5 MHz case, and we have to lower
|
||||||
|
* the usdhc clock from 198 to 49.5 MHz to match the pad configuration.
|
||||||
|
*
|
||||||
|
* FIXME: This is should be removed after pinctrl API is available.
|
||||||
|
* At that time, usdhc driver can call pinctrl API to change pad
|
||||||
|
* configuration dynamically per different usdhc clock settings.
|
||||||
|
*/
|
||||||
|
clk_set_rate(&usdhc1_clk, 49500000);
|
||||||
|
clk_set_rate(&usdhc2_clk, 49500000);
|
||||||
|
clk_set_rate(&usdhc3_clk, 49500000);
|
||||||
|
clk_set_rate(&usdhc4_clk, 49500000);
|
||||||
|
|
||||||
np = of_find_compatible_node(NULL, NULL, "fsl,imx6q-gpt");
|
np = of_find_compatible_node(NULL, NULL, "fsl,imx6q-gpt");
|
||||||
base = of_iomap(np, 0);
|
base = of_iomap(np, 0);
|
||||||
WARN_ON(!base);
|
WARN_ON(!base);
|
||||||
|
@ -15,6 +15,8 @@ obj-$(CONFIG_MSM_SMD) += smd.o smd_debug.o
|
|||||||
obj-$(CONFIG_MSM_SMD) += last_radio_log.o
|
obj-$(CONFIG_MSM_SMD) += last_radio_log.o
|
||||||
obj-$(CONFIG_MSM_SCM) += scm.o scm-boot.o
|
obj-$(CONFIG_MSM_SCM) += scm.o scm-boot.o
|
||||||
|
|
||||||
|
CFLAGS_scm.o :=$(call as-instr,.arch_extension sec,-DREQUIRES_SEC=1)
|
||||||
|
|
||||||
obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o
|
obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o
|
||||||
obj-$(CONFIG_SMP) += headsmp.o platsmp.o
|
obj-$(CONFIG_SMP) += headsmp.o platsmp.o
|
||||||
|
|
||||||
|
@ -42,8 +42,8 @@
|
|||||||
|
|
||||||
extern struct sys_timer msm_timer;
|
extern struct sys_timer msm_timer;
|
||||||
|
|
||||||
static void __init msm7x30_fixup(struct machine_desc *desc, struct tag *tag,
|
static void __init msm7x30_fixup(struct tag *tag, char **cmdline,
|
||||||
char **cmdline, struct meminfo *mi)
|
struct meminfo *mi)
|
||||||
{
|
{
|
||||||
for (; tag->hdr.size; tag = tag_next(tag))
|
for (; tag->hdr.size; tag = tag_next(tag))
|
||||||
if (tag->hdr.tag == ATAG_MEM && tag->u.mem.start == 0x200000) {
|
if (tag->hdr.tag == ATAG_MEM && tag->u.mem.start == 0x200000) {
|
||||||
|
@ -32,8 +32,8 @@
|
|||||||
|
|
||||||
#include "devices.h"
|
#include "devices.h"
|
||||||
|
|
||||||
static void __init msm8960_fixup(struct machine_desc *desc, struct tag *tag,
|
static void __init msm8960_fixup(struct tag *tag, char **cmdline,
|
||||||
char **cmdline, struct meminfo *mi)
|
struct meminfo *mi)
|
||||||
{
|
{
|
||||||
for (; tag->hdr.size; tag = tag_next(tag))
|
for (; tag->hdr.size; tag = tag_next(tag))
|
||||||
if (tag->hdr.tag == ATAG_MEM &&
|
if (tag->hdr.tag == ATAG_MEM &&
|
||||||
|
@ -28,8 +28,8 @@
|
|||||||
#include <mach/board.h>
|
#include <mach/board.h>
|
||||||
#include <mach/msm_iomap.h>
|
#include <mach/msm_iomap.h>
|
||||||
|
|
||||||
static void __init msm8x60_fixup(struct machine_desc *desc, struct tag *tag,
|
static void __init msm8x60_fixup(struct tag *tag, char **cmdline,
|
||||||
char **cmdline, struct meminfo *mi)
|
struct meminfo *mi)
|
||||||
{
|
{
|
||||||
for (; tag->hdr.size; tag = tag_next(tag))
|
for (; tag->hdr.size; tag = tag_next(tag))
|
||||||
if (tag->hdr.tag == ATAG_MEM &&
|
if (tag->hdr.tag == ATAG_MEM &&
|
||||||
|
@ -180,6 +180,9 @@ static u32 smc(u32 cmd_addr)
|
|||||||
__asmeq("%1", "r0")
|
__asmeq("%1", "r0")
|
||||||
__asmeq("%2", "r1")
|
__asmeq("%2", "r1")
|
||||||
__asmeq("%3", "r2")
|
__asmeq("%3", "r2")
|
||||||
|
#ifdef REQUIRES_SEC
|
||||||
|
".arch_extension sec\n"
|
||||||
|
#endif
|
||||||
"smc #0 @ switch to secure world\n"
|
"smc #0 @ switch to secure world\n"
|
||||||
: "=r" (r0)
|
: "=r" (r0)
|
||||||
: "r" (r0), "r" (r1), "r" (r2)
|
: "r" (r0), "r" (r1), "r" (r2)
|
||||||
|
@ -1281,9 +1281,9 @@ DEFINE_CLOCK(gpt_clk, 0, MXC_CCM_CCGR2, MXC_CCM_CCGRx_CG9_OFFSET,
|
|||||||
NULL, NULL, &ipg_clk, &gpt_ipg_clk);
|
NULL, NULL, &ipg_clk, &gpt_ipg_clk);
|
||||||
|
|
||||||
DEFINE_CLOCK(pwm1_clk, 0, MXC_CCM_CCGR2, MXC_CCM_CCGRx_CG6_OFFSET,
|
DEFINE_CLOCK(pwm1_clk, 0, MXC_CCM_CCGR2, MXC_CCM_CCGRx_CG6_OFFSET,
|
||||||
NULL, NULL, &ipg_clk, NULL);
|
NULL, NULL, &ipg_perclk, NULL);
|
||||||
DEFINE_CLOCK(pwm2_clk, 0, MXC_CCM_CCGR2, MXC_CCM_CCGRx_CG8_OFFSET,
|
DEFINE_CLOCK(pwm2_clk, 0, MXC_CCM_CCGR2, MXC_CCM_CCGRx_CG8_OFFSET,
|
||||||
NULL, NULL, &ipg_clk, NULL);
|
NULL, NULL, &ipg_perclk, NULL);
|
||||||
|
|
||||||
/* I2C */
|
/* I2C */
|
||||||
DEFINE_CLOCK(i2c1_clk, 0, MXC_CCM_CCGR1, MXC_CCM_CCGRx_CG9_OFFSET,
|
DEFINE_CLOCK(i2c1_clk, 0, MXC_CCM_CCGR1, MXC_CCM_CCGRx_CG9_OFFSET,
|
||||||
@ -1634,6 +1634,7 @@ int __init mx53_clocks_init(unsigned long ckil, unsigned long osc,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef CONFIG_OF
|
||||||
static void __init clk_get_freq_dt(unsigned long *ckil, unsigned long *osc,
|
static void __init clk_get_freq_dt(unsigned long *ckil, unsigned long *osc,
|
||||||
unsigned long *ckih1, unsigned long *ckih2)
|
unsigned long *ckih1, unsigned long *ckih2)
|
||||||
{
|
{
|
||||||
@ -1671,3 +1672,4 @@ int __init mx53_clocks_init_dt(void)
|
|||||||
clk_get_freq_dt(&ckil, &osc, &ckih1, &ckih2);
|
clk_get_freq_dt(&ckil, &osc, &ckih1, &ckih2);
|
||||||
return mx53_clocks_init(ckil, osc, ckih1, ckih2);
|
return mx53_clocks_init(ckil, osc, ckih1, ckih2);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
@ -471,7 +471,8 @@ static void __init mx28evk_init(void)
|
|||||||
"mmc0-slot-power");
|
"mmc0-slot-power");
|
||||||
if (ret)
|
if (ret)
|
||||||
pr_warn("failed to request gpio mmc0-slot-power: %d\n", ret);
|
pr_warn("failed to request gpio mmc0-slot-power: %d\n", ret);
|
||||||
mx28_add_mxs_mmc(0, &mx28evk_mmc_pdata[0]);
|
else
|
||||||
|
mx28_add_mxs_mmc(0, &mx28evk_mmc_pdata[0]);
|
||||||
|
|
||||||
ret = gpio_request_one(MX28EVK_MMC1_SLOT_POWER, GPIOF_OUT_INIT_LOW,
|
ret = gpio_request_one(MX28EVK_MMC1_SLOT_POWER, GPIOF_OUT_INIT_LOW,
|
||||||
"mmc1-slot-power");
|
"mmc1-slot-power");
|
||||||
@ -480,7 +481,6 @@ static void __init mx28evk_init(void)
|
|||||||
else
|
else
|
||||||
mx28_add_mxs_mmc(1, &mx28evk_mmc_pdata[1]);
|
mx28_add_mxs_mmc(1, &mx28evk_mmc_pdata[1]);
|
||||||
|
|
||||||
mx28_add_mxs_mmc(1, &mx28evk_mmc_pdata[1]);
|
|
||||||
mx28_add_rtc_stmp3xxx();
|
mx28_add_rtc_stmp3xxx();
|
||||||
|
|
||||||
gpio_led_register_device(0, &mx28evk_led_data);
|
gpio_led_register_device(0, &mx28evk_led_data);
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
#define UART_SHIFT 2
|
#define UART_SHIFT 2
|
||||||
|
|
||||||
.macro addruart, rp, rv
|
.macro addruart, rp, rv, tmp
|
||||||
ldr \rv, =PHYS_TO_IO(PICOXCELL_UART1_BASE)
|
ldr \rv, =PHYS_TO_IO(PICOXCELL_UART1_BASE)
|
||||||
ldr \rp, =PICOXCELL_UART1_BASE
|
ldr \rp, =PICOXCELL_UART1_BASE
|
||||||
.endm
|
.endm
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
# Common objects
|
# Common objects
|
||||||
obj-y := timer.o console.o clock.o pm_runtime.o
|
obj-y := timer.o console.o clock.o
|
||||||
|
|
||||||
# CPU objects
|
# CPU objects
|
||||||
obj-$(CONFIG_ARCH_SH7367) += setup-sh7367.o clock-sh7367.o intc-sh7367.o
|
obj-$(CONFIG_ARCH_SH7367) += setup-sh7367.o clock-sh7367.o intc-sh7367.o
|
||||||
|
@ -607,6 +607,7 @@ struct sys_timer ag5evm_timer = {
|
|||||||
|
|
||||||
MACHINE_START(AG5EVM, "ag5evm")
|
MACHINE_START(AG5EVM, "ag5evm")
|
||||||
.map_io = ag5evm_map_io,
|
.map_io = ag5evm_map_io,
|
||||||
|
.nr_irqs = NR_IRQS_LEGACY,
|
||||||
.init_irq = sh73a0_init_irq,
|
.init_irq = sh73a0_init_irq,
|
||||||
.handle_irq = shmobile_handle_irq_gic,
|
.handle_irq = shmobile_handle_irq_gic,
|
||||||
.init_machine = ag5evm_init,
|
.init_machine = ag5evm_init,
|
||||||
|
@ -33,6 +33,7 @@
|
|||||||
#include <linux/input/sh_keysc.h>
|
#include <linux/input/sh_keysc.h>
|
||||||
#include <linux/gpio_keys.h>
|
#include <linux/gpio_keys.h>
|
||||||
#include <linux/leds.h>
|
#include <linux/leds.h>
|
||||||
|
#include <linux/platform_data/leds-renesas-tpu.h>
|
||||||
#include <linux/mmc/host.h>
|
#include <linux/mmc/host.h>
|
||||||
#include <linux/mmc/sh_mmcif.h>
|
#include <linux/mmc/sh_mmcif.h>
|
||||||
#include <linux/mfd/tmio.h>
|
#include <linux/mfd/tmio.h>
|
||||||
@ -56,7 +57,7 @@ static struct resource smsc9220_resources[] = {
|
|||||||
.flags = IORESOURCE_MEM,
|
.flags = IORESOURCE_MEM,
|
||||||
},
|
},
|
||||||
[1] = {
|
[1] = {
|
||||||
.start = gic_spi(33), /* PINTA2 @ PORT144 */
|
.start = SH73A0_PINT0_IRQ(2), /* PINTA2 */
|
||||||
.flags = IORESOURCE_IRQ,
|
.flags = IORESOURCE_IRQ,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
@ -157,10 +158,6 @@ static struct platform_device gpio_keys_device = {
|
|||||||
#define GPIO_LED(n, g) { .name = n, .gpio = g }
|
#define GPIO_LED(n, g) { .name = n, .gpio = g }
|
||||||
|
|
||||||
static struct gpio_led gpio_leds[] = {
|
static struct gpio_led gpio_leds[] = {
|
||||||
GPIO_LED("V2513", GPIO_PORT153), /* PORT153 [TPU1T02] -> V2513 */
|
|
||||||
GPIO_LED("V2514", GPIO_PORT199), /* PORT199 [TPU4TO1] -> V2514 */
|
|
||||||
GPIO_LED("V2515", GPIO_PORT197), /* PORT197 [TPU2TO1] -> V2515 */
|
|
||||||
GPIO_LED("KEYLED", GPIO_PORT163), /* PORT163 [TPU3TO0] -> KEYLED */
|
|
||||||
GPIO_LED("G", GPIO_PORT20), /* PORT20 [GPO0] -> LED7 -> "G" */
|
GPIO_LED("G", GPIO_PORT20), /* PORT20 [GPO0] -> LED7 -> "G" */
|
||||||
GPIO_LED("H", GPIO_PORT21), /* PORT21 [GPO1] -> LED8 -> "H" */
|
GPIO_LED("H", GPIO_PORT21), /* PORT21 [GPO1] -> LED8 -> "H" */
|
||||||
GPIO_LED("J", GPIO_PORT22), /* PORT22 [GPO2] -> LED9 -> "J" */
|
GPIO_LED("J", GPIO_PORT22), /* PORT22 [GPO2] -> LED9 -> "J" */
|
||||||
@ -179,6 +176,119 @@ static struct platform_device gpio_leds_device = {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/* TPU LED */
|
||||||
|
static struct led_renesas_tpu_config led_renesas_tpu12_pdata = {
|
||||||
|
.name = "V2513",
|
||||||
|
.pin_gpio_fn = GPIO_FN_TPU1TO2,
|
||||||
|
.pin_gpio = GPIO_PORT153,
|
||||||
|
.channel_offset = 0x90,
|
||||||
|
.timer_bit = 2,
|
||||||
|
.max_brightness = 1000,
|
||||||
|
};
|
||||||
|
|
||||||
|
static struct resource tpu12_resources[] = {
|
||||||
|
[0] = {
|
||||||
|
.name = "TPU12",
|
||||||
|
.start = 0xe6610090,
|
||||||
|
.end = 0xe66100b5,
|
||||||
|
.flags = IORESOURCE_MEM,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
static struct platform_device leds_tpu12_device = {
|
||||||
|
.name = "leds-renesas-tpu",
|
||||||
|
.id = 12,
|
||||||
|
.dev = {
|
||||||
|
.platform_data = &led_renesas_tpu12_pdata,
|
||||||
|
},
|
||||||
|
.num_resources = ARRAY_SIZE(tpu12_resources),
|
||||||
|
.resource = tpu12_resources,
|
||||||
|
};
|
||||||
|
|
||||||
|
static struct led_renesas_tpu_config led_renesas_tpu41_pdata = {
|
||||||
|
.name = "V2514",
|
||||||
|
.pin_gpio_fn = GPIO_FN_TPU4TO1,
|
||||||
|
.pin_gpio = GPIO_PORT199,
|
||||||
|
.channel_offset = 0x50,
|
||||||
|
.timer_bit = 1,
|
||||||
|
.max_brightness = 1000,
|
||||||
|
};
|
||||||
|
|
||||||
|
static struct resource tpu41_resources[] = {
|
||||||
|
[0] = {
|
||||||
|
.name = "TPU41",
|
||||||
|
.start = 0xe6640050,
|
||||||
|
.end = 0xe6640075,
|
||||||
|
.flags = IORESOURCE_MEM,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
static struct platform_device leds_tpu41_device = {
|
||||||
|
.name = "leds-renesas-tpu",
|
||||||
|
.id = 41,
|
||||||
|
.dev = {
|
||||||
|
.platform_data = &led_renesas_tpu41_pdata,
|
||||||
|
},
|
||||||
|
.num_resources = ARRAY_SIZE(tpu41_resources),
|
||||||
|
.resource = tpu41_resources,
|
||||||
|
};
|
||||||
|
|
||||||
|
static struct led_renesas_tpu_config led_renesas_tpu21_pdata = {
|
||||||
|
.name = "V2515",
|
||||||
|
.pin_gpio_fn = GPIO_FN_TPU2TO1,
|
||||||
|
.pin_gpio = GPIO_PORT197,
|
||||||
|
.channel_offset = 0x50,
|
||||||
|
.timer_bit = 1,
|
||||||
|
.max_brightness = 1000,
|
||||||
|
};
|
||||||
|
|
||||||
|
static struct resource tpu21_resources[] = {
|
||||||
|
[0] = {
|
||||||
|
.name = "TPU21",
|
||||||
|
.start = 0xe6620050,
|
||||||
|
.end = 0xe6620075,
|
||||||
|
.flags = IORESOURCE_MEM,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
static struct platform_device leds_tpu21_device = {
|
||||||
|
.name = "leds-renesas-tpu",
|
||||||
|
.id = 21,
|
||||||
|
.dev = {
|
||||||
|
.platform_data = &led_renesas_tpu21_pdata,
|
||||||
|
},
|
||||||
|
.num_resources = ARRAY_SIZE(tpu21_resources),
|
||||||
|
.resource = tpu21_resources,
|
||||||
|
};
|
||||||
|
|
||||||
|
static struct led_renesas_tpu_config led_renesas_tpu30_pdata = {
|
||||||
|
.name = "KEYLED",
|
||||||
|
.pin_gpio_fn = GPIO_FN_TPU3TO0,
|
||||||
|
.pin_gpio = GPIO_PORT163,
|
||||||
|
.channel_offset = 0x10,
|
||||||
|
.timer_bit = 0,
|
||||||
|
.max_brightness = 1000,
|
||||||
|
};
|
||||||
|
|
||||||
|
static struct resource tpu30_resources[] = {
|
||||||
|
[0] = {
|
||||||
|
.name = "TPU30",
|
||||||
|
.start = 0xe6630010,
|
||||||
|
.end = 0xe6630035,
|
||||||
|
.flags = IORESOURCE_MEM,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
static struct platform_device leds_tpu30_device = {
|
||||||
|
.name = "leds-renesas-tpu",
|
||||||
|
.id = 30,
|
||||||
|
.dev = {
|
||||||
|
.platform_data = &led_renesas_tpu30_pdata,
|
||||||
|
},
|
||||||
|
.num_resources = ARRAY_SIZE(tpu30_resources),
|
||||||
|
.resource = tpu30_resources,
|
||||||
|
};
|
||||||
|
|
||||||
/* MMCIF */
|
/* MMCIF */
|
||||||
static struct resource mmcif_resources[] = {
|
static struct resource mmcif_resources[] = {
|
||||||
[0] = {
|
[0] = {
|
||||||
@ -291,6 +401,10 @@ static struct platform_device *kota2_devices[] __initdata = {
|
|||||||
&keysc_device,
|
&keysc_device,
|
||||||
&gpio_keys_device,
|
&gpio_keys_device,
|
||||||
&gpio_leds_device,
|
&gpio_leds_device,
|
||||||
|
&leds_tpu12_device,
|
||||||
|
&leds_tpu41_device,
|
||||||
|
&leds_tpu21_device,
|
||||||
|
&leds_tpu30_device,
|
||||||
&mmcif_device,
|
&mmcif_device,
|
||||||
&sdhi0_device,
|
&sdhi0_device,
|
||||||
&sdhi1_device,
|
&sdhi1_device,
|
||||||
@ -317,18 +431,6 @@ static void __init kota2_map_io(void)
|
|||||||
shmobile_setup_console();
|
shmobile_setup_console();
|
||||||
}
|
}
|
||||||
|
|
||||||
#define PINTER0A 0xe69000a0
|
|
||||||
#define PINTCR0A 0xe69000b0
|
|
||||||
|
|
||||||
void __init kota2_init_irq(void)
|
|
||||||
{
|
|
||||||
sh73a0_init_irq();
|
|
||||||
|
|
||||||
/* setup PINT: enable PINTA2 as active low */
|
|
||||||
__raw_writel(1 << 29, PINTER0A);
|
|
||||||
__raw_writew(2 << 10, PINTCR0A);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void __init kota2_init(void)
|
static void __init kota2_init(void)
|
||||||
{
|
{
|
||||||
sh73a0_pinmux_init();
|
sh73a0_pinmux_init();
|
||||||
@ -447,7 +549,8 @@ struct sys_timer kota2_timer = {
|
|||||||
|
|
||||||
MACHINE_START(KOTA2, "kota2")
|
MACHINE_START(KOTA2, "kota2")
|
||||||
.map_io = kota2_map_io,
|
.map_io = kota2_map_io,
|
||||||
.init_irq = kota2_init_irq,
|
.nr_irqs = NR_IRQS_LEGACY,
|
||||||
|
.init_irq = sh73a0_init_irq,
|
||||||
.handle_irq = shmobile_handle_irq_gic,
|
.handle_irq = shmobile_handle_irq_gic,
|
||||||
.init_machine = kota2_init,
|
.init_machine = kota2_init,
|
||||||
.timer = &kota2_timer,
|
.timer = &kota2_timer,
|
||||||
|
@ -113,6 +113,12 @@ static struct clk main_clk = {
|
|||||||
.ops = &main_clk_ops,
|
.ops = &main_clk_ops,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/* Divide Main clock by two */
|
||||||
|
static struct clk main_div2_clk = {
|
||||||
|
.ops = &div2_clk_ops,
|
||||||
|
.parent = &main_clk,
|
||||||
|
};
|
||||||
|
|
||||||
/* PLL0, PLL1, PLL2, PLL3 */
|
/* PLL0, PLL1, PLL2, PLL3 */
|
||||||
static unsigned long pll_recalc(struct clk *clk)
|
static unsigned long pll_recalc(struct clk *clk)
|
||||||
{
|
{
|
||||||
@ -181,6 +187,7 @@ static struct clk *main_clks[] = {
|
|||||||
&extal1_div2_clk,
|
&extal1_div2_clk,
|
||||||
&extal2_div2_clk,
|
&extal2_div2_clk,
|
||||||
&main_clk,
|
&main_clk,
|
||||||
|
&main_div2_clk,
|
||||||
&pll0_clk,
|
&pll0_clk,
|
||||||
&pll1_clk,
|
&pll1_clk,
|
||||||
&pll2_clk,
|
&pll2_clk,
|
||||||
@ -243,7 +250,7 @@ static struct clk div6_clks[DIV6_NR] = {
|
|||||||
[DIV6_VCK1] = SH_CLK_DIV6(&pll1_div2_clk, VCLKCR1, 0),
|
[DIV6_VCK1] = SH_CLK_DIV6(&pll1_div2_clk, VCLKCR1, 0),
|
||||||
[DIV6_VCK2] = SH_CLK_DIV6(&pll1_div2_clk, VCLKCR2, 0),
|
[DIV6_VCK2] = SH_CLK_DIV6(&pll1_div2_clk, VCLKCR2, 0),
|
||||||
[DIV6_VCK3] = SH_CLK_DIV6(&pll1_div2_clk, VCLKCR3, 0),
|
[DIV6_VCK3] = SH_CLK_DIV6(&pll1_div2_clk, VCLKCR3, 0),
|
||||||
[DIV6_ZB1] = SH_CLK_DIV6(&pll1_div2_clk, ZBCKCR, 0),
|
[DIV6_ZB1] = SH_CLK_DIV6(&pll1_div2_clk, ZBCKCR, CLK_ENABLE_ON_INIT),
|
||||||
[DIV6_FLCTL] = SH_CLK_DIV6(&pll1_div2_clk, FLCKCR, 0),
|
[DIV6_FLCTL] = SH_CLK_DIV6(&pll1_div2_clk, FLCKCR, 0),
|
||||||
[DIV6_SDHI0] = SH_CLK_DIV6(&pll1_div2_clk, SD0CKCR, 0),
|
[DIV6_SDHI0] = SH_CLK_DIV6(&pll1_div2_clk, SD0CKCR, 0),
|
||||||
[DIV6_SDHI1] = SH_CLK_DIV6(&pll1_div2_clk, SD1CKCR, 0),
|
[DIV6_SDHI1] = SH_CLK_DIV6(&pll1_div2_clk, SD1CKCR, 0),
|
||||||
@ -268,6 +275,7 @@ enum { MSTP001,
|
|||||||
MSTP207, MSTP206, MSTP204, MSTP203, MSTP202, MSTP201, MSTP200,
|
MSTP207, MSTP206, MSTP204, MSTP203, MSTP202, MSTP201, MSTP200,
|
||||||
MSTP331, MSTP329, MSTP325, MSTP323, MSTP318,
|
MSTP331, MSTP329, MSTP325, MSTP323, MSTP318,
|
||||||
MSTP314, MSTP313, MSTP312, MSTP311,
|
MSTP314, MSTP313, MSTP312, MSTP311,
|
||||||
|
MSTP303, MSTP302, MSTP301, MSTP300,
|
||||||
MSTP411, MSTP410, MSTP403,
|
MSTP411, MSTP410, MSTP403,
|
||||||
MSTP_NR };
|
MSTP_NR };
|
||||||
|
|
||||||
@ -301,6 +309,10 @@ static struct clk mstp_clks[MSTP_NR] = {
|
|||||||
[MSTP313] = MSTP(&div6_clks[DIV6_SDHI1], SMSTPCR3, 13, 0), /* SDHI1 */
|
[MSTP313] = MSTP(&div6_clks[DIV6_SDHI1], SMSTPCR3, 13, 0), /* SDHI1 */
|
||||||
[MSTP312] = MSTP(&div4_clks[DIV4_HP], SMSTPCR3, 12, 0), /* MMCIF0 */
|
[MSTP312] = MSTP(&div4_clks[DIV4_HP], SMSTPCR3, 12, 0), /* MMCIF0 */
|
||||||
[MSTP311] = MSTP(&div6_clks[DIV6_SDHI2], SMSTPCR3, 11, 0), /* SDHI2 */
|
[MSTP311] = MSTP(&div6_clks[DIV6_SDHI2], SMSTPCR3, 11, 0), /* SDHI2 */
|
||||||
|
[MSTP303] = MSTP(&main_div2_clk, SMSTPCR3, 3, 0), /* TPU1 */
|
||||||
|
[MSTP302] = MSTP(&main_div2_clk, SMSTPCR3, 2, 0), /* TPU2 */
|
||||||
|
[MSTP301] = MSTP(&main_div2_clk, SMSTPCR3, 1, 0), /* TPU3 */
|
||||||
|
[MSTP300] = MSTP(&main_div2_clk, SMSTPCR3, 0, 0), /* TPU4 */
|
||||||
[MSTP411] = MSTP(&div4_clks[DIV4_HP], SMSTPCR4, 11, 0), /* IIC3 */
|
[MSTP411] = MSTP(&div4_clks[DIV4_HP], SMSTPCR4, 11, 0), /* IIC3 */
|
||||||
[MSTP410] = MSTP(&div4_clks[DIV4_HP], SMSTPCR4, 10, 0), /* IIC4 */
|
[MSTP410] = MSTP(&div4_clks[DIV4_HP], SMSTPCR4, 10, 0), /* IIC4 */
|
||||||
[MSTP403] = MSTP(&r_clk, SMSTPCR4, 3, 0), /* KEYSC */
|
[MSTP403] = MSTP(&r_clk, SMSTPCR4, 3, 0), /* KEYSC */
|
||||||
@ -350,6 +362,10 @@ static struct clk_lookup lookups[] = {
|
|||||||
CLKDEV_DEV_ID("sh_mobile_sdhi.1", &mstp_clks[MSTP313]), /* SDHI1 */
|
CLKDEV_DEV_ID("sh_mobile_sdhi.1", &mstp_clks[MSTP313]), /* SDHI1 */
|
||||||
CLKDEV_DEV_ID("sh_mmcif.0", &mstp_clks[MSTP312]), /* MMCIF0 */
|
CLKDEV_DEV_ID("sh_mmcif.0", &mstp_clks[MSTP312]), /* MMCIF0 */
|
||||||
CLKDEV_DEV_ID("sh_mobile_sdhi.2", &mstp_clks[MSTP311]), /* SDHI2 */
|
CLKDEV_DEV_ID("sh_mobile_sdhi.2", &mstp_clks[MSTP311]), /* SDHI2 */
|
||||||
|
CLKDEV_DEV_ID("leds-renesas-tpu.12", &mstp_clks[MSTP303]), /* TPU1 */
|
||||||
|
CLKDEV_DEV_ID("leds-renesas-tpu.21", &mstp_clks[MSTP302]), /* TPU2 */
|
||||||
|
CLKDEV_DEV_ID("leds-renesas-tpu.30", &mstp_clks[MSTP301]), /* TPU3 */
|
||||||
|
CLKDEV_DEV_ID("leds-renesas-tpu.41", &mstp_clks[MSTP300]), /* TPU4 */
|
||||||
CLKDEV_DEV_ID("i2c-sh_mobile.3", &mstp_clks[MSTP411]), /* I2C3 */
|
CLKDEV_DEV_ID("i2c-sh_mobile.3", &mstp_clks[MSTP411]), /* I2C3 */
|
||||||
CLKDEV_DEV_ID("i2c-sh_mobile.4", &mstp_clks[MSTP410]), /* I2C4 */
|
CLKDEV_DEV_ID("i2c-sh_mobile.4", &mstp_clks[MSTP410]), /* I2C4 */
|
||||||
CLKDEV_DEV_ID("sh_keysc.0", &mstp_clks[MSTP403]), /* KEYSC */
|
CLKDEV_DEV_ID("sh_keysc.0", &mstp_clks[MSTP403]), /* KEYSC */
|
||||||
|
@ -101,6 +101,13 @@ static void __init tegra_dt_init(void)
|
|||||||
|
|
||||||
tegra_clk_init_from_table(tegra_dt_clk_init_table);
|
tegra_clk_init_from_table(tegra_dt_clk_init_table);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Finished with the static registrations now; fill in the missing
|
||||||
|
* devices
|
||||||
|
*/
|
||||||
|
of_platform_populate(NULL, tegra_dt_match_table,
|
||||||
|
tegra20_auxdata_lookup, NULL);
|
||||||
|
|
||||||
for (i = 0; i < ARRAY_SIZE(pinmux_configs); i++) {
|
for (i = 0; i < ARRAY_SIZE(pinmux_configs); i++) {
|
||||||
if (of_machine_is_compatible(pinmux_configs[i].machine)) {
|
if (of_machine_is_compatible(pinmux_configs[i].machine)) {
|
||||||
pinmux_configs[i].init();
|
pinmux_configs[i].init();
|
||||||
@ -110,12 +117,6 @@ static void __init tegra_dt_init(void)
|
|||||||
|
|
||||||
WARN(i == ARRAY_SIZE(pinmux_configs),
|
WARN(i == ARRAY_SIZE(pinmux_configs),
|
||||||
"Unknown platform! Pinmuxing not initialized\n");
|
"Unknown platform! Pinmuxing not initialized\n");
|
||||||
|
|
||||||
/*
|
|
||||||
* Finished with the static registrations now; fill in the missing
|
|
||||||
* devices
|
|
||||||
*/
|
|
||||||
of_platform_populate(NULL, tegra_dt_match_table, tegra20_auxdata_lookup, NULL);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static const char * tegra_dt_board_compat[] = {
|
static const char * tegra_dt_board_compat[] = {
|
||||||
|
@ -16,6 +16,8 @@
|
|||||||
|
|
||||||
#include <linux/kernel.h>
|
#include <linux/kernel.h>
|
||||||
#include <linux/gpio.h>
|
#include <linux/gpio.h>
|
||||||
|
#include <linux/of.h>
|
||||||
|
|
||||||
#include <mach/pinmux.h>
|
#include <mach/pinmux.h>
|
||||||
|
|
||||||
#include "gpio-names.h"
|
#include "gpio-names.h"
|
||||||
@ -161,7 +163,9 @@ static struct tegra_gpio_table gpio_table[] = {
|
|||||||
|
|
||||||
void harmony_pinmux_init(void)
|
void harmony_pinmux_init(void)
|
||||||
{
|
{
|
||||||
platform_add_devices(pinmux_devices, ARRAY_SIZE(pinmux_devices));
|
if (!of_machine_is_compatible("nvidia,tegra20"))
|
||||||
|
platform_add_devices(pinmux_devices,
|
||||||
|
ARRAY_SIZE(pinmux_devices));
|
||||||
|
|
||||||
tegra_pinmux_config_table(harmony_pinmux, ARRAY_SIZE(harmony_pinmux));
|
tegra_pinmux_config_table(harmony_pinmux, ARRAY_SIZE(harmony_pinmux));
|
||||||
|
|
||||||
|
@ -16,6 +16,8 @@
|
|||||||
|
|
||||||
#include <linux/kernel.h>
|
#include <linux/kernel.h>
|
||||||
#include <linux/gpio.h>
|
#include <linux/gpio.h>
|
||||||
|
#include <linux/of.h>
|
||||||
|
|
||||||
#include <mach/pinmux.h>
|
#include <mach/pinmux.h>
|
||||||
|
|
||||||
#include "gpio-names.h"
|
#include "gpio-names.h"
|
||||||
@ -158,7 +160,9 @@ static struct tegra_gpio_table gpio_table[] = {
|
|||||||
|
|
||||||
void paz00_pinmux_init(void)
|
void paz00_pinmux_init(void)
|
||||||
{
|
{
|
||||||
platform_add_devices(pinmux_devices, ARRAY_SIZE(pinmux_devices));
|
if (!of_machine_is_compatible("nvidia,tegra20"))
|
||||||
|
platform_add_devices(pinmux_devices,
|
||||||
|
ARRAY_SIZE(pinmux_devices));
|
||||||
|
|
||||||
tegra_pinmux_config_table(paz00_pinmux, ARRAY_SIZE(paz00_pinmux));
|
tegra_pinmux_config_table(paz00_pinmux, ARRAY_SIZE(paz00_pinmux));
|
||||||
|
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
#include <linux/kernel.h>
|
#include <linux/kernel.h>
|
||||||
#include <linux/init.h>
|
#include <linux/init.h>
|
||||||
#include <linux/gpio.h>
|
#include <linux/gpio.h>
|
||||||
|
#include <linux/of.h>
|
||||||
|
|
||||||
#include <mach/pinmux.h>
|
#include <mach/pinmux.h>
|
||||||
#include <mach/pinmux-t2.h>
|
#include <mach/pinmux-t2.h>
|
||||||
@ -191,6 +192,7 @@ static struct tegra_gpio_table common_gpio_table[] = {
|
|||||||
{ .gpio = TEGRA_GPIO_SD2_POWER, .enable = true },
|
{ .gpio = TEGRA_GPIO_SD2_POWER, .enable = true },
|
||||||
{ .gpio = TEGRA_GPIO_LIDSWITCH, .enable = true },
|
{ .gpio = TEGRA_GPIO_LIDSWITCH, .enable = true },
|
||||||
{ .gpio = TEGRA_GPIO_POWERKEY, .enable = true },
|
{ .gpio = TEGRA_GPIO_POWERKEY, .enable = true },
|
||||||
|
{ .gpio = TEGRA_GPIO_HP_DET, .enable = true },
|
||||||
{ .gpio = TEGRA_GPIO_ISL29018_IRQ, .enable = true },
|
{ .gpio = TEGRA_GPIO_ISL29018_IRQ, .enable = true },
|
||||||
{ .gpio = TEGRA_GPIO_CDC_IRQ, .enable = true },
|
{ .gpio = TEGRA_GPIO_CDC_IRQ, .enable = true },
|
||||||
{ .gpio = TEGRA_GPIO_USB1, .enable = true },
|
{ .gpio = TEGRA_GPIO_USB1, .enable = true },
|
||||||
@ -218,7 +220,9 @@ static void __init update_pinmux(struct tegra_pingroup_config *newtbl, int size)
|
|||||||
|
|
||||||
void __init seaboard_common_pinmux_init(void)
|
void __init seaboard_common_pinmux_init(void)
|
||||||
{
|
{
|
||||||
platform_add_devices(pinmux_devices, ARRAY_SIZE(pinmux_devices));
|
if (!of_machine_is_compatible("nvidia,tegra20"))
|
||||||
|
platform_add_devices(pinmux_devices,
|
||||||
|
ARRAY_SIZE(pinmux_devices));
|
||||||
|
|
||||||
tegra_pinmux_config_table(seaboard_pinmux, ARRAY_SIZE(seaboard_pinmux));
|
tegra_pinmux_config_table(seaboard_pinmux, ARRAY_SIZE(seaboard_pinmux));
|
||||||
|
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
#include <linux/gpio.h>
|
#include <linux/gpio.h>
|
||||||
#include <linux/kernel.h>
|
#include <linux/kernel.h>
|
||||||
#include <linux/init.h>
|
#include <linux/init.h>
|
||||||
|
#include <linux/of.h>
|
||||||
|
|
||||||
#include <mach/pinmux.h>
|
#include <mach/pinmux.h>
|
||||||
|
|
||||||
@ -157,7 +158,9 @@ static struct tegra_gpio_table gpio_table[] = {
|
|||||||
|
|
||||||
void __init trimslice_pinmux_init(void)
|
void __init trimslice_pinmux_init(void)
|
||||||
{
|
{
|
||||||
platform_add_devices(pinmux_devices, ARRAY_SIZE(pinmux_devices));
|
if (!of_machine_is_compatible("nvidia,tegra20"))
|
||||||
|
platform_add_devices(pinmux_devices,
|
||||||
|
ARRAY_SIZE(pinmux_devices));
|
||||||
tegra_pinmux_config_table(trimslice_pinmux, ARRAY_SIZE(trimslice_pinmux));
|
tegra_pinmux_config_table(trimslice_pinmux, ARRAY_SIZE(trimslice_pinmux));
|
||||||
tegra_gpio_config(gpio_table, ARRAY_SIZE(gpio_table));
|
tegra_gpio_config(gpio_table, ARRAY_SIZE(gpio_table));
|
||||||
}
|
}
|
||||||
|
@ -10,7 +10,7 @@ choice
|
|||||||
|
|
||||||
config ARCH_IMX_V4_V5
|
config ARCH_IMX_V4_V5
|
||||||
bool "i.MX1, i.MX21, i.MX25, i.MX27"
|
bool "i.MX1, i.MX21, i.MX25, i.MX27"
|
||||||
select AUTO_ZRELADDR
|
select AUTO_ZRELADDR if !ZBOOT_ROM
|
||||||
select ARM_PATCH_PHYS_VIRT
|
select ARM_PATCH_PHYS_VIRT
|
||||||
help
|
help
|
||||||
This enables support for systems based on the Freescale i.MX ARMv4
|
This enables support for systems based on the Freescale i.MX ARMv4
|
||||||
@ -26,7 +26,7 @@ config ARCH_IMX_V6_V7
|
|||||||
|
|
||||||
config ARCH_MX5
|
config ARCH_MX5
|
||||||
bool "i.MX50, i.MX51, i.MX53"
|
bool "i.MX50, i.MX51, i.MX53"
|
||||||
select AUTO_ZRELADDR
|
select AUTO_ZRELADDR if !ZBOOT_ROM
|
||||||
select ARM_PATCH_PHYS_VIRT
|
select ARM_PATCH_PHYS_VIRT
|
||||||
help
|
help
|
||||||
This enables support for machines using Freescale's i.MX50 and i.MX53
|
This enables support for machines using Freescale's i.MX50 and i.MX53
|
||||||
|
@ -22,6 +22,7 @@
|
|||||||
#include <linux/io.h>
|
#include <linux/io.h>
|
||||||
#include <mach/common.h>
|
#include <mach/common.h>
|
||||||
#include <asm/mach/irq.h>
|
#include <asm/mach/irq.h>
|
||||||
|
#include <asm/exception.h>
|
||||||
#include <mach/hardware.h>
|
#include <mach/hardware.h>
|
||||||
|
|
||||||
#include "irq-common.h"
|
#include "irq-common.h"
|
||||||
|
@ -28,21 +28,14 @@ asmlinkage void __exception_irq_entry gic_handle_irq(struct pt_regs *regs)
|
|||||||
if (irqnr == 1023)
|
if (irqnr == 1023)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
if (irqnr > 29 && irqnr < 1021)
|
if (irqnr > 15 && irqnr < 1021)
|
||||||
handle_IRQ(irqnr, regs);
|
handle_IRQ(irqnr, regs);
|
||||||
#ifdef CONFIG_SMP
|
#ifdef CONFIG_SMP
|
||||||
else if (irqnr < 16) {
|
else {
|
||||||
writel_relaxed(irqstat, gic_cpu_base_addr +
|
writel_relaxed(irqstat, gic_cpu_base_addr +
|
||||||
GIC_CPU_EOI);
|
GIC_CPU_EOI);
|
||||||
handle_IPI(irqnr, regs);
|
handle_IPI(irqnr, regs);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
#ifdef CONFIG_LOCAL_TIMERS
|
|
||||||
else if (irqnr == 29) {
|
|
||||||
writel_relaxed(irqstat, gic_cpu_base_addr +
|
|
||||||
GIC_CPU_EOI);
|
|
||||||
handle_local_timer(regs);
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
} while (1);
|
} while (1);
|
||||||
}
|
}
|
||||||
|
@ -25,6 +25,3 @@
|
|||||||
|
|
||||||
.macro test_for_ipi, irqnr, irqstat, base, tmp
|
.macro test_for_ipi, irqnr, irqstat, base, tmp
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro test_for_ltirq, irqnr, irqstat, base, tmp
|
|
||||||
.endm
|
|
||||||
|
@ -17,6 +17,7 @@
|
|||||||
#include <linux/io.h>
|
#include <linux/io.h>
|
||||||
|
|
||||||
#include <asm/mach/irq.h>
|
#include <asm/mach/irq.h>
|
||||||
|
#include <asm/exception.h>
|
||||||
|
|
||||||
#include <mach/hardware.h>
|
#include <mach/hardware.h>
|
||||||
#include <mach/common.h>
|
#include <mach/common.h>
|
||||||
|
@ -32,6 +32,8 @@ struct work_struct;
|
|||||||
struct bfin_serial_port {
|
struct bfin_serial_port {
|
||||||
struct uart_port port;
|
struct uart_port port;
|
||||||
unsigned int old_status;
|
unsigned int old_status;
|
||||||
|
int tx_irq;
|
||||||
|
int rx_irq;
|
||||||
int status_irq;
|
int status_irq;
|
||||||
#ifndef BFIN_UART_BF54X_STYLE
|
#ifndef BFIN_UART_BF54X_STYLE
|
||||||
unsigned int lsr;
|
unsigned int lsr;
|
||||||
|
@ -372,9 +372,14 @@ static struct resource bfin_uart0_resources[] = {
|
|||||||
.end = UART0_GCTL+2,
|
.end = UART0_GCTL+2,
|
||||||
.flags = IORESOURCE_MEM,
|
.flags = IORESOURCE_MEM,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
.start = IRQ_UART0_TX,
|
||||||
|
.end = IRQ_UART0_TX,
|
||||||
|
.flags = IORESOURCE_IRQ,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
.start = IRQ_UART0_RX,
|
.start = IRQ_UART0_RX,
|
||||||
.end = IRQ_UART0_RX+1,
|
.end = IRQ_UART0_RX,
|
||||||
.flags = IORESOURCE_IRQ,
|
.flags = IORESOURCE_IRQ,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -415,9 +420,14 @@ static struct resource bfin_uart1_resources[] = {
|
|||||||
.end = UART1_GCTL+2,
|
.end = UART1_GCTL+2,
|
||||||
.flags = IORESOURCE_MEM,
|
.flags = IORESOURCE_MEM,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
.start = IRQ_UART1_TX,
|
||||||
|
.end = IRQ_UART1_TX,
|
||||||
|
.flags = IORESOURCE_IRQ,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
.start = IRQ_UART1_RX,
|
.start = IRQ_UART1_RX,
|
||||||
.end = IRQ_UART1_RX+1,
|
.end = IRQ_UART1_RX,
|
||||||
.flags = IORESOURCE_IRQ,
|
.flags = IORESOURCE_IRQ,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -308,9 +308,14 @@ static struct resource bfin_uart0_resources[] = {
|
|||||||
.end = UART0_GCTL+2,
|
.end = UART0_GCTL+2,
|
||||||
.flags = IORESOURCE_MEM,
|
.flags = IORESOURCE_MEM,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
.start = IRQ_UART0_TX,
|
||||||
|
.end = IRQ_UART0_TX,
|
||||||
|
.flags = IORESOURCE_IRQ,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
.start = IRQ_UART0_RX,
|
.start = IRQ_UART0_RX,
|
||||||
.end = IRQ_UART0_RX+1,
|
.end = IRQ_UART0_RX,
|
||||||
.flags = IORESOURCE_IRQ,
|
.flags = IORESOURCE_IRQ,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -351,9 +356,14 @@ static struct resource bfin_uart1_resources[] = {
|
|||||||
.end = UART1_GCTL+2,
|
.end = UART1_GCTL+2,
|
||||||
.flags = IORESOURCE_MEM,
|
.flags = IORESOURCE_MEM,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
.start = IRQ_UART1_TX,
|
||||||
|
.end = IRQ_UART1_TX,
|
||||||
|
.flags = IORESOURCE_IRQ,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
.start = IRQ_UART1_RX,
|
.start = IRQ_UART1_RX,
|
||||||
.end = IRQ_UART1_RX+1,
|
.end = IRQ_UART1_RX,
|
||||||
.flags = IORESOURCE_IRQ,
|
.flags = IORESOURCE_IRQ,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -380,9 +380,14 @@ static struct resource bfin_uart0_resources[] = {
|
|||||||
.end = UART0_GCTL+2,
|
.end = UART0_GCTL+2,
|
||||||
.flags = IORESOURCE_MEM,
|
.flags = IORESOURCE_MEM,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
.start = IRQ_UART0_TX,
|
||||||
|
.end = IRQ_UART0_TX,
|
||||||
|
.flags = IORESOURCE_IRQ,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
.start = IRQ_UART0_RX,
|
.start = IRQ_UART0_RX,
|
||||||
.end = IRQ_UART0_RX+1,
|
.end = IRQ_UART0_RX,
|
||||||
.flags = IORESOURCE_IRQ,
|
.flags = IORESOURCE_IRQ,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -423,9 +428,14 @@ static struct resource bfin_uart1_resources[] = {
|
|||||||
.end = UART1_GCTL+2,
|
.end = UART1_GCTL+2,
|
||||||
.flags = IORESOURCE_MEM,
|
.flags = IORESOURCE_MEM,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
.start = IRQ_UART1_TX,
|
||||||
|
.end = IRQ_UART1_TX,
|
||||||
|
.flags = IORESOURCE_IRQ,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
.start = IRQ_UART1_RX,
|
.start = IRQ_UART1_RX,
|
||||||
.end = IRQ_UART1_RX+1,
|
.end = IRQ_UART1_RX,
|
||||||
.flags = IORESOURCE_IRQ,
|
.flags = IORESOURCE_IRQ,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -8,6 +8,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <linux/device.h>
|
#include <linux/device.h>
|
||||||
|
#include <linux/export.h>
|
||||||
#include <linux/platform_device.h>
|
#include <linux/platform_device.h>
|
||||||
#include <linux/mtd/mtd.h>
|
#include <linux/mtd/mtd.h>
|
||||||
#include <linux/mtd/partitions.h>
|
#include <linux/mtd/partitions.h>
|
||||||
@ -538,9 +539,14 @@ static struct resource bfin_uart0_resources[] = {
|
|||||||
.end = UART0_GCTL+2,
|
.end = UART0_GCTL+2,
|
||||||
.flags = IORESOURCE_MEM,
|
.flags = IORESOURCE_MEM,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
.start = IRQ_UART0_TX,
|
||||||
|
.end = IRQ_UART0_TX,
|
||||||
|
.flags = IORESOURCE_IRQ,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
.start = IRQ_UART0_RX,
|
.start = IRQ_UART0_RX,
|
||||||
.end = IRQ_UART0_RX+1,
|
.end = IRQ_UART0_RX,
|
||||||
.flags = IORESOURCE_IRQ,
|
.flags = IORESOURCE_IRQ,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -581,9 +587,14 @@ static struct resource bfin_uart1_resources[] = {
|
|||||||
.end = UART1_GCTL+2,
|
.end = UART1_GCTL+2,
|
||||||
.flags = IORESOURCE_MEM,
|
.flags = IORESOURCE_MEM,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
.start = IRQ_UART1_TX,
|
||||||
|
.end = IRQ_UART1_TX,
|
||||||
|
.flags = IORESOURCE_IRQ,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
.start = IRQ_UART1_RX,
|
.start = IRQ_UART1_RX,
|
||||||
.end = IRQ_UART1_RX+1,
|
.end = IRQ_UART1_RX,
|
||||||
.flags = IORESOURCE_IRQ,
|
.flags = IORESOURCE_IRQ,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -801,7 +812,6 @@ static struct platform_device bfin_sport1_uart_device = {
|
|||||||
#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE)
|
#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE)
|
||||||
#include <linux/input.h>
|
#include <linux/input.h>
|
||||||
#include <linux/gpio_keys.h>
|
#include <linux/gpio_keys.h>
|
||||||
#include <linux/export.h>
|
|
||||||
|
|
||||||
static struct gpio_keys_button bfin_gpio_keys_table[] = {
|
static struct gpio_keys_button bfin_gpio_keys_table[] = {
|
||||||
{BTN_0, GPIO_PF14, 1, "gpio-keys: BTN0"},
|
{BTN_0, GPIO_PF14, 1, "gpio-keys: BTN0"},
|
||||||
|
@ -7,6 +7,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <linux/device.h>
|
#include <linux/device.h>
|
||||||
|
#include <linux/export.h>
|
||||||
#include <linux/platform_device.h>
|
#include <linux/platform_device.h>
|
||||||
#include <linux/mtd/mtd.h>
|
#include <linux/mtd/mtd.h>
|
||||||
#include <linux/mtd/partitions.h>
|
#include <linux/mtd/partitions.h>
|
||||||
@ -416,9 +417,14 @@ static struct resource bfin_uart0_resources[] = {
|
|||||||
.end = UART0_GCTL+2,
|
.end = UART0_GCTL+2,
|
||||||
.flags = IORESOURCE_MEM,
|
.flags = IORESOURCE_MEM,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
.start = IRQ_UART0_TX,
|
||||||
|
.end = IRQ_UART0_TX,
|
||||||
|
.flags = IORESOURCE_IRQ,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
.start = IRQ_UART0_RX,
|
.start = IRQ_UART0_RX,
|
||||||
.end = IRQ_UART0_RX+1,
|
.end = IRQ_UART0_RX,
|
||||||
.flags = IORESOURCE_IRQ,
|
.flags = IORESOURCE_IRQ,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -459,9 +465,14 @@ static struct resource bfin_uart1_resources[] = {
|
|||||||
.end = UART1_GCTL+2,
|
.end = UART1_GCTL+2,
|
||||||
.flags = IORESOURCE_MEM,
|
.flags = IORESOURCE_MEM,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
.start = IRQ_UART1_TX,
|
||||||
|
.end = IRQ_UART1_TX,
|
||||||
|
.flags = IORESOURCE_IRQ,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
.start = IRQ_UART1_RX,
|
.start = IRQ_UART1_RX,
|
||||||
.end = IRQ_UART1_RX+1,
|
.end = IRQ_UART1_RX,
|
||||||
.flags = IORESOURCE_IRQ,
|
.flags = IORESOURCE_IRQ,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -674,7 +685,6 @@ static struct platform_device bfin_sport1_uart_device = {
|
|||||||
#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE)
|
#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE)
|
||||||
#include <linux/input.h>
|
#include <linux/input.h>
|
||||||
#include <linux/gpio_keys.h>
|
#include <linux/gpio_keys.h>
|
||||||
#include <linux/export.h>
|
|
||||||
|
|
||||||
static struct gpio_keys_button bfin_gpio_keys_table[] = {
|
static struct gpio_keys_button bfin_gpio_keys_table[] = {
|
||||||
{BTN_0, GPIO_PG0, 1, "gpio-keys: BTN0"},
|
{BTN_0, GPIO_PG0, 1, "gpio-keys: BTN0"},
|
||||||
|
@ -710,9 +710,14 @@ static struct resource bfin_uart0_resources[] = {
|
|||||||
.end = UART0_GCTL+2,
|
.end = UART0_GCTL+2,
|
||||||
.flags = IORESOURCE_MEM,
|
.flags = IORESOURCE_MEM,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
.start = IRQ_UART0_TX,
|
||||||
|
.end = IRQ_UART0_TX,
|
||||||
|
.flags = IORESOURCE_IRQ,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
.start = IRQ_UART0_RX,
|
.start = IRQ_UART0_RX,
|
||||||
.end = IRQ_UART0_RX+1,
|
.end = IRQ_UART0_RX,
|
||||||
.flags = IORESOURCE_IRQ,
|
.flags = IORESOURCE_IRQ,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -753,9 +758,14 @@ static struct resource bfin_uart1_resources[] = {
|
|||||||
.end = UART1_GCTL+2,
|
.end = UART1_GCTL+2,
|
||||||
.flags = IORESOURCE_MEM,
|
.flags = IORESOURCE_MEM,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
.start = IRQ_UART1_TX,
|
||||||
|
.end = IRQ_UART1_TX,
|
||||||
|
.flags = IORESOURCE_IRQ,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
.start = IRQ_UART1_RX,
|
.start = IRQ_UART1_RX,
|
||||||
.end = IRQ_UART1_RX+1,
|
.end = IRQ_UART1_RX,
|
||||||
.flags = IORESOURCE_IRQ,
|
.flags = IORESOURCE_IRQ,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -495,9 +495,14 @@ static struct resource bfin_uart0_resources[] = {
|
|||||||
.end = UART0_GCTL+2,
|
.end = UART0_GCTL+2,
|
||||||
.flags = IORESOURCE_MEM,
|
.flags = IORESOURCE_MEM,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
.start = IRQ_UART0_TX,
|
||||||
|
.end = IRQ_UART0_TX,
|
||||||
|
.flags = IORESOURCE_IRQ,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
.start = IRQ_UART0_RX,
|
.start = IRQ_UART0_RX,
|
||||||
.end = IRQ_UART0_RX+1,
|
.end = IRQ_UART0_RX,
|
||||||
.flags = IORESOURCE_IRQ,
|
.flags = IORESOURCE_IRQ,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -539,9 +544,14 @@ static struct resource bfin_uart1_resources[] = {
|
|||||||
.end = UART1_GCTL+2,
|
.end = UART1_GCTL+2,
|
||||||
.flags = IORESOURCE_MEM,
|
.flags = IORESOURCE_MEM,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
.start = IRQ_UART1_TX,
|
||||||
|
.end = IRQ_UART1_TX,
|
||||||
|
.flags = IORESOURCE_IRQ,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
.start = IRQ_UART1_RX,
|
.start = IRQ_UART1_RX,
|
||||||
.end = IRQ_UART1_RX+1,
|
.end = IRQ_UART1_RX,
|
||||||
.flags = IORESOURCE_IRQ,
|
.flags = IORESOURCE_IRQ,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -237,9 +237,14 @@ static struct resource bfin_uart0_resources[] = {
|
|||||||
.end = BFIN_UART_GCTL+2,
|
.end = BFIN_UART_GCTL+2,
|
||||||
.flags = IORESOURCE_MEM,
|
.flags = IORESOURCE_MEM,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
.start = IRQ_UART0_TX,
|
||||||
|
.end = IRQ_UART0_TX,
|
||||||
|
.flags = IORESOURCE_IRQ,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
.start = IRQ_UART0_RX,
|
.start = IRQ_UART0_RX,
|
||||||
.end = IRQ_UART0_RX + 1,
|
.end = IRQ_UART0_RX,
|
||||||
.flags = IORESOURCE_IRQ,
|
.flags = IORESOURCE_IRQ,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -192,9 +192,14 @@ static struct resource bfin_uart0_resources[] = {
|
|||||||
.end = BFIN_UART_GCTL+2,
|
.end = BFIN_UART_GCTL+2,
|
||||||
.flags = IORESOURCE_MEM,
|
.flags = IORESOURCE_MEM,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
.start = IRQ_UART0_TX,
|
||||||
|
.end = IRQ_UART0_TX,
|
||||||
|
.flags = IORESOURCE_IRQ,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
.start = IRQ_UART0_RX,
|
.start = IRQ_UART0_RX,
|
||||||
.end = IRQ_UART0_RX + 1,
|
.end = IRQ_UART0_RX,
|
||||||
.flags = IORESOURCE_IRQ,
|
.flags = IORESOURCE_IRQ,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -220,9 +220,14 @@ static struct resource bfin_uart0_resources[] = {
|
|||||||
.end = BFIN_UART_GCTL+2,
|
.end = BFIN_UART_GCTL+2,
|
||||||
.flags = IORESOURCE_MEM,
|
.flags = IORESOURCE_MEM,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
.start = IRQ_UART0_TX,
|
||||||
|
.end = IRQ_UART0_TX,
|
||||||
|
.flags = IORESOURCE_IRQ,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
.start = IRQ_UART0_RX,
|
.start = IRQ_UART0_RX,
|
||||||
.end = IRQ_UART0_RX + 1,
|
.end = IRQ_UART0_RX,
|
||||||
.flags = IORESOURCE_IRQ,
|
.flags = IORESOURCE_IRQ,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -291,9 +291,14 @@ static struct resource bfin_uart0_resources[] = {
|
|||||||
.end = BFIN_UART_GCTL+2,
|
.end = BFIN_UART_GCTL+2,
|
||||||
.flags = IORESOURCE_MEM,
|
.flags = IORESOURCE_MEM,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
.start = IRQ_UART0_TX,
|
||||||
|
.end = IRQ_UART0_TX,
|
||||||
|
.flags = IORESOURCE_IRQ,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
.start = IRQ_UART0_RX,
|
.start = IRQ_UART0_RX,
|
||||||
.end = IRQ_UART0_RX + 1,
|
.end = IRQ_UART0_RX,
|
||||||
.flags = IORESOURCE_IRQ,
|
.flags = IORESOURCE_IRQ,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -150,9 +150,14 @@ static struct resource bfin_uart0_resources[] = {
|
|||||||
.end = BFIN_UART_GCTL+2,
|
.end = BFIN_UART_GCTL+2,
|
||||||
.flags = IORESOURCE_MEM,
|
.flags = IORESOURCE_MEM,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
.start = IRQ_UART0_TX,
|
||||||
|
.end = IRQ_UART0_TX,
|
||||||
|
.flags = IORESOURCE_IRQ,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
.start = IRQ_UART0_RX,
|
.start = IRQ_UART0_RX,
|
||||||
.end = IRQ_UART0_RX + 1,
|
.end = IRQ_UART0_RX,
|
||||||
.flags = IORESOURCE_IRQ,
|
.flags = IORESOURCE_IRQ,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -297,9 +297,14 @@ static struct resource bfin_uart0_resources[] = {
|
|||||||
.end = BFIN_UART_GCTL+2,
|
.end = BFIN_UART_GCTL+2,
|
||||||
.flags = IORESOURCE_MEM,
|
.flags = IORESOURCE_MEM,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
.start = IRQ_UART0_TX,
|
||||||
|
.end = IRQ_UART0_TX,
|
||||||
|
.flags = IORESOURCE_IRQ,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
.start = IRQ_UART0_RX,
|
.start = IRQ_UART0_RX,
|
||||||
.end = IRQ_UART0_RX + 1,
|
.end = IRQ_UART0_RX,
|
||||||
.flags = IORESOURCE_IRQ,
|
.flags = IORESOURCE_IRQ,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -8,6 +8,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <linux/device.h>
|
#include <linux/device.h>
|
||||||
|
#include <linux/export.h>
|
||||||
#include <linux/etherdevice.h>
|
#include <linux/etherdevice.h>
|
||||||
#include <linux/platform_device.h>
|
#include <linux/platform_device.h>
|
||||||
#include <linux/mtd/mtd.h>
|
#include <linux/mtd/mtd.h>
|
||||||
@ -304,9 +305,14 @@ static struct resource bfin_uart0_resources[] = {
|
|||||||
.end = UART0_GCTL+2,
|
.end = UART0_GCTL+2,
|
||||||
.flags = IORESOURCE_MEM,
|
.flags = IORESOURCE_MEM,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
.start = IRQ_UART0_TX,
|
||||||
|
.end = IRQ_UART0_TX,
|
||||||
|
.flags = IORESOURCE_IRQ,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
.start = IRQ_UART0_RX,
|
.start = IRQ_UART0_RX,
|
||||||
.end = IRQ_UART0_RX+1,
|
.end = IRQ_UART0_RX,
|
||||||
.flags = IORESOURCE_IRQ,
|
.flags = IORESOURCE_IRQ,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -365,9 +371,14 @@ static struct resource bfin_uart1_resources[] = {
|
|||||||
.end = UART1_GCTL+2,
|
.end = UART1_GCTL+2,
|
||||||
.flags = IORESOURCE_MEM,
|
.flags = IORESOURCE_MEM,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
.start = IRQ_UART1_TX,
|
||||||
|
.end = IRQ_UART1_TX,
|
||||||
|
.flags = IORESOURCE_IRQ,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
.start = IRQ_UART1_RX,
|
.start = IRQ_UART1_RX,
|
||||||
.end = IRQ_UART1_RX+1,
|
.end = IRQ_UART1_RX,
|
||||||
.flags = IORESOURCE_IRQ,
|
.flags = IORESOURCE_IRQ,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -569,7 +580,6 @@ static struct platform_device bfin_sport1_uart_device = {
|
|||||||
|
|
||||||
#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE)
|
#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE)
|
||||||
#include <linux/bfin_mac.h>
|
#include <linux/bfin_mac.h>
|
||||||
#include <linux/export.h>
|
|
||||||
static const unsigned short bfin_mac_peripherals[] = P_MII0;
|
static const unsigned short bfin_mac_peripherals[] = P_MII0;
|
||||||
|
|
||||||
static struct bfin_phydev_platform_data bfin_phydev_data[] = {
|
static struct bfin_phydev_platform_data bfin_phydev_data[] = {
|
||||||
|
@ -9,6 +9,7 @@
|
|||||||
|
|
||||||
#include <linux/device.h>
|
#include <linux/device.h>
|
||||||
#include <linux/etherdevice.h>
|
#include <linux/etherdevice.h>
|
||||||
|
#include <linux/export.h>
|
||||||
#include <linux/platform_device.h>
|
#include <linux/platform_device.h>
|
||||||
#include <linux/mtd/mtd.h>
|
#include <linux/mtd/mtd.h>
|
||||||
#include <linux/mtd/partitions.h>
|
#include <linux/mtd/partitions.h>
|
||||||
@ -305,9 +306,14 @@ static struct resource bfin_uart0_resources[] = {
|
|||||||
.end = UART0_GCTL+2,
|
.end = UART0_GCTL+2,
|
||||||
.flags = IORESOURCE_MEM,
|
.flags = IORESOURCE_MEM,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
.start = IRQ_UART0_TX,
|
||||||
|
.end = IRQ_UART0_TX,
|
||||||
|
.flags = IORESOURCE_IRQ,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
.start = IRQ_UART0_RX,
|
.start = IRQ_UART0_RX,
|
||||||
.end = IRQ_UART0_RX+1,
|
.end = IRQ_UART0_RX,
|
||||||
.flags = IORESOURCE_IRQ,
|
.flags = IORESOURCE_IRQ,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -348,9 +354,14 @@ static struct resource bfin_uart1_resources[] = {
|
|||||||
.end = UART1_GCTL+2,
|
.end = UART1_GCTL+2,
|
||||||
.flags = IORESOURCE_MEM,
|
.flags = IORESOURCE_MEM,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
.start = IRQ_UART1_TX,
|
||||||
|
.end = IRQ_UART1_TX,
|
||||||
|
.flags = IORESOURCE_IRQ,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
.start = IRQ_UART1_RX,
|
.start = IRQ_UART1_RX,
|
||||||
.end = IRQ_UART1_RX+1,
|
.end = IRQ_UART1_RX,
|
||||||
.flags = IORESOURCE_IRQ,
|
.flags = IORESOURCE_IRQ,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -534,7 +545,6 @@ static struct platform_device bfin_sport1_uart_device = {
|
|||||||
|
|
||||||
#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE)
|
#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE)
|
||||||
#include <linux/bfin_mac.h>
|
#include <linux/bfin_mac.h>
|
||||||
#include <linux/export.h>
|
|
||||||
static const unsigned short bfin_mac_peripherals[] = P_MII0;
|
static const unsigned short bfin_mac_peripherals[] = P_MII0;
|
||||||
|
|
||||||
static struct bfin_phydev_platform_data bfin_phydev_data[] = {
|
static struct bfin_phydev_platform_data bfin_phydev_data[] = {
|
||||||
|
@ -12,6 +12,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <linux/device.h>
|
#include <linux/device.h>
|
||||||
|
#include <linux/export.h>
|
||||||
#include <linux/kernel.h>
|
#include <linux/kernel.h>
|
||||||
#include <linux/platform_device.h>
|
#include <linux/platform_device.h>
|
||||||
#include <linux/io.h>
|
#include <linux/io.h>
|
||||||
@ -49,7 +50,6 @@ static struct platform_device rtc_device = {
|
|||||||
|
|
||||||
#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE)
|
#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE)
|
||||||
#include <linux/bfin_mac.h>
|
#include <linux/bfin_mac.h>
|
||||||
#include <linux/export.h>
|
|
||||||
static const unsigned short bfin_mac_peripherals[] = P_RMII0;
|
static const unsigned short bfin_mac_peripherals[] = P_RMII0;
|
||||||
|
|
||||||
static struct bfin_phydev_platform_data bfin_phydev_data[] = {
|
static struct bfin_phydev_platform_data bfin_phydev_data[] = {
|
||||||
@ -236,9 +236,14 @@ static struct resource bfin_uart0_resources[] = {
|
|||||||
.end = UART0_GCTL+2,
|
.end = UART0_GCTL+2,
|
||||||
.flags = IORESOURCE_MEM,
|
.flags = IORESOURCE_MEM,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
.start = IRQ_UART0_TX,
|
||||||
|
.end = IRQ_UART0_TX,
|
||||||
|
.flags = IORESOURCE_IRQ,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
.start = IRQ_UART0_RX,
|
.start = IRQ_UART0_RX,
|
||||||
.end = IRQ_UART0_RX+1,
|
.end = IRQ_UART0_RX,
|
||||||
.flags = IORESOURCE_IRQ,
|
.flags = IORESOURCE_IRQ,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -280,9 +285,14 @@ static struct resource bfin_uart1_resources[] = {
|
|||||||
.end = UART1_GCTL+2,
|
.end = UART1_GCTL+2,
|
||||||
.flags = IORESOURCE_MEM,
|
.flags = IORESOURCE_MEM,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
.start = IRQ_UART1_TX,
|
||||||
|
.end = IRQ_UART1_TX,
|
||||||
|
.flags = IORESOURCE_IRQ,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
.start = IRQ_UART1_RX,
|
.start = IRQ_UART1_RX,
|
||||||
.end = IRQ_UART1_RX+1,
|
.end = IRQ_UART1_RX,
|
||||||
.flags = IORESOURCE_IRQ,
|
.flags = IORESOURCE_IRQ,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -239,9 +239,14 @@ static struct resource bfin_uart0_resources[] = {
|
|||||||
.end = UART0_GCTL+2,
|
.end = UART0_GCTL+2,
|
||||||
.flags = IORESOURCE_MEM,
|
.flags = IORESOURCE_MEM,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
.start = IRQ_UART0_TX,
|
||||||
|
.end = IRQ_UART0_TX,
|
||||||
|
.flags = IORESOURCE_IRQ,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
.start = IRQ_UART0_RX,
|
.start = IRQ_UART0_RX,
|
||||||
.end = IRQ_UART0_RX+1,
|
.end = IRQ_UART0_RX,
|
||||||
.flags = IORESOURCE_IRQ,
|
.flags = IORESOURCE_IRQ,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -282,9 +287,14 @@ static struct resource bfin_uart1_resources[] = {
|
|||||||
.end = UART1_GCTL+2,
|
.end = UART1_GCTL+2,
|
||||||
.flags = IORESOURCE_MEM,
|
.flags = IORESOURCE_MEM,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
.start = IRQ_UART1_TX,
|
||||||
|
.end = IRQ_UART1_TX,
|
||||||
|
.flags = IORESOURCE_IRQ,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
.start = IRQ_UART1_RX,
|
.start = IRQ_UART1_RX,
|
||||||
.end = IRQ_UART1_RX+1,
|
.end = IRQ_UART1_RX,
|
||||||
.flags = IORESOURCE_IRQ,
|
.flags = IORESOURCE_IRQ,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -8,6 +8,7 @@
|
|||||||
|
|
||||||
#include <linux/device.h>
|
#include <linux/device.h>
|
||||||
#include <linux/etherdevice.h>
|
#include <linux/etherdevice.h>
|
||||||
|
#include <linux/export.h>
|
||||||
#include <linux/platform_device.h>
|
#include <linux/platform_device.h>
|
||||||
#include <linux/mtd/mtd.h>
|
#include <linux/mtd/mtd.h>
|
||||||
#include <linux/mtd/partitions.h>
|
#include <linux/mtd/partitions.h>
|
||||||
@ -308,9 +309,14 @@ static struct resource bfin_uart0_resources[] = {
|
|||||||
.end = UART0_GCTL+2,
|
.end = UART0_GCTL+2,
|
||||||
.flags = IORESOURCE_MEM,
|
.flags = IORESOURCE_MEM,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
.start = IRQ_UART0_TX,
|
||||||
|
.end = IRQ_UART0_TX,
|
||||||
|
.flags = IORESOURCE_IRQ,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
.start = IRQ_UART0_RX,
|
.start = IRQ_UART0_RX,
|
||||||
.end = IRQ_UART0_RX+1,
|
.end = IRQ_UART0_RX,
|
||||||
.flags = IORESOURCE_IRQ,
|
.flags = IORESOURCE_IRQ,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -351,9 +357,14 @@ static struct resource bfin_uart1_resources[] = {
|
|||||||
.end = UART1_GCTL+2,
|
.end = UART1_GCTL+2,
|
||||||
.flags = IORESOURCE_MEM,
|
.flags = IORESOURCE_MEM,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
.start = IRQ_UART1_TX,
|
||||||
|
.end = IRQ_UART1_TX,
|
||||||
|
.flags = IORESOURCE_IRQ,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
.start = IRQ_UART1_RX,
|
.start = IRQ_UART1_RX,
|
||||||
.end = IRQ_UART1_RX+1,
|
.end = IRQ_UART1_RX,
|
||||||
.flags = IORESOURCE_IRQ,
|
.flags = IORESOURCE_IRQ,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -7,6 +7,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <linux/device.h>
|
#include <linux/device.h>
|
||||||
|
#include <linux/export.h>
|
||||||
#include <linux/kernel.h>
|
#include <linux/kernel.h>
|
||||||
#include <linux/platform_device.h>
|
#include <linux/platform_device.h>
|
||||||
#include <linux/io.h>
|
#include <linux/io.h>
|
||||||
@ -1565,9 +1566,14 @@ static struct resource bfin_uart0_resources[] = {
|
|||||||
.end = UART0_GCTL+2,
|
.end = UART0_GCTL+2,
|
||||||
.flags = IORESOURCE_MEM,
|
.flags = IORESOURCE_MEM,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
.start = IRQ_UART0_TX,
|
||||||
|
.end = IRQ_UART0_TX,
|
||||||
|
.flags = IORESOURCE_IRQ,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
.start = IRQ_UART0_RX,
|
.start = IRQ_UART0_RX,
|
||||||
.end = IRQ_UART0_RX+1,
|
.end = IRQ_UART0_RX,
|
||||||
.flags = IORESOURCE_IRQ,
|
.flags = IORESOURCE_IRQ,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -1620,9 +1626,14 @@ static struct resource bfin_uart1_resources[] = {
|
|||||||
.end = UART1_GCTL+2,
|
.end = UART1_GCTL+2,
|
||||||
.flags = IORESOURCE_MEM,
|
.flags = IORESOURCE_MEM,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
.start = IRQ_UART1_TX,
|
||||||
|
.end = IRQ_UART1_TX,
|
||||||
|
.flags = IORESOURCE_IRQ,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
.start = IRQ_UART1_RX,
|
.start = IRQ_UART1_RX,
|
||||||
.end = IRQ_UART1_RX+1,
|
.end = IRQ_UART1_RX,
|
||||||
.flags = IORESOURCE_IRQ,
|
.flags = IORESOURCE_IRQ,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -1992,7 +2003,6 @@ static struct adp8870_backlight_platform_data adp8870_pdata = {
|
|||||||
|
|
||||||
#if defined(CONFIG_BACKLIGHT_ADP8860) || defined(CONFIG_BACKLIGHT_ADP8860_MODULE)
|
#if defined(CONFIG_BACKLIGHT_ADP8860) || defined(CONFIG_BACKLIGHT_ADP8860_MODULE)
|
||||||
#include <linux/i2c/adp8860.h>
|
#include <linux/i2c/adp8860.h>
|
||||||
#include <linux/export.h>
|
|
||||||
static struct led_info adp8860_leds[] = {
|
static struct led_info adp8860_leds[] = {
|
||||||
{
|
{
|
||||||
.name = "adp8860-led7",
|
.name = "adp8860-led7",
|
||||||
|
@ -9,6 +9,7 @@
|
|||||||
|
|
||||||
#include <linux/device.h>
|
#include <linux/device.h>
|
||||||
#include <linux/etherdevice.h>
|
#include <linux/etherdevice.h>
|
||||||
|
#include <linux/export.h>
|
||||||
#include <linux/platform_device.h>
|
#include <linux/platform_device.h>
|
||||||
#include <linux/mtd/mtd.h>
|
#include <linux/mtd/mtd.h>
|
||||||
#include <linux/mtd/partitions.h>
|
#include <linux/mtd/partitions.h>
|
||||||
@ -305,9 +306,14 @@ static struct resource bfin_uart0_resources[] = {
|
|||||||
.end = UART0_GCTL+2,
|
.end = UART0_GCTL+2,
|
||||||
.flags = IORESOURCE_MEM,
|
.flags = IORESOURCE_MEM,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
.start = IRQ_UART0_TX,
|
||||||
|
.end = IRQ_UART0_TX,
|
||||||
|
.flags = IORESOURCE_IRQ,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
.start = IRQ_UART0_RX,
|
.start = IRQ_UART0_RX,
|
||||||
.end = IRQ_UART0_RX+1,
|
.end = IRQ_UART0_RX,
|
||||||
.flags = IORESOURCE_IRQ,
|
.flags = IORESOURCE_IRQ,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -348,9 +354,14 @@ static struct resource bfin_uart1_resources[] = {
|
|||||||
.end = UART1_GCTL+2,
|
.end = UART1_GCTL+2,
|
||||||
.flags = IORESOURCE_MEM,
|
.flags = IORESOURCE_MEM,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
.start = IRQ_UART1_TX,
|
||||||
|
.end = IRQ_UART1_TX,
|
||||||
|
.flags = IORESOURCE_IRQ,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
.start = IRQ_UART1_RX,
|
.start = IRQ_UART1_RX,
|
||||||
.end = IRQ_UART1_RX+1,
|
.end = IRQ_UART1_RX,
|
||||||
.flags = IORESOURCE_IRQ,
|
.flags = IORESOURCE_IRQ,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -536,7 +547,6 @@ static struct platform_device bfin_sport1_uart_device = {
|
|||||||
|
|
||||||
#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE)
|
#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE)
|
||||||
#include <linux/bfin_mac.h>
|
#include <linux/bfin_mac.h>
|
||||||
#include <linux/export.h>
|
|
||||||
static const unsigned short bfin_mac_peripherals[] = P_MII0;
|
static const unsigned short bfin_mac_peripherals[] = P_MII0;
|
||||||
|
|
||||||
static struct bfin_phydev_platform_data bfin_phydev_data[] = {
|
static struct bfin_phydev_platform_data bfin_phydev_data[] = {
|
||||||
|
@ -48,9 +48,14 @@ static struct resource bfin_uart0_resources[] = {
|
|||||||
.end = UART0_GCTL+2,
|
.end = UART0_GCTL+2,
|
||||||
.flags = IORESOURCE_MEM,
|
.flags = IORESOURCE_MEM,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
.start = IRQ_UART0_TX,
|
||||||
|
.end = IRQ_UART0_TX,
|
||||||
|
.flags = IORESOURCE_IRQ,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
.start = IRQ_UART0_RX,
|
.start = IRQ_UART0_RX,
|
||||||
.end = IRQ_UART0_RX+1,
|
.end = IRQ_UART0_RX,
|
||||||
.flags = IORESOURCE_IRQ,
|
.flags = IORESOURCE_IRQ,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -103,9 +108,14 @@ static struct resource bfin_uart1_resources[] = {
|
|||||||
.end = UART1_GCTL+2,
|
.end = UART1_GCTL+2,
|
||||||
.flags = IORESOURCE_MEM,
|
.flags = IORESOURCE_MEM,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
.start = IRQ_UART1_TX,
|
||||||
|
.end = IRQ_UART1_TX,
|
||||||
|
.flags = IORESOURCE_IRQ,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
.start = IRQ_UART1_RX,
|
.start = IRQ_UART1_RX,
|
||||||
.end = IRQ_UART1_RX+1,
|
.end = IRQ_UART1_RX,
|
||||||
.flags = IORESOURCE_IRQ,
|
.flags = IORESOURCE_IRQ,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -146,9 +156,14 @@ static struct resource bfin_uart2_resources[] = {
|
|||||||
.end = UART2_GCTL+2,
|
.end = UART2_GCTL+2,
|
||||||
.flags = IORESOURCE_MEM,
|
.flags = IORESOURCE_MEM,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
.start = IRQ_UART2_TX,
|
||||||
|
.end = IRQ_UART2_TX,
|
||||||
|
.flags = IORESOURCE_IRQ,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
.start = IRQ_UART2_RX,
|
.start = IRQ_UART2_RX,
|
||||||
.end = IRQ_UART2_RX+1,
|
.end = IRQ_UART2_RX,
|
||||||
.flags = IORESOURCE_IRQ,
|
.flags = IORESOURCE_IRQ,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -134,9 +134,14 @@ static struct resource bfin_uart0_resources[] = {
|
|||||||
.end = UART0_RBR+2,
|
.end = UART0_RBR+2,
|
||||||
.flags = IORESOURCE_MEM,
|
.flags = IORESOURCE_MEM,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
.start = IRQ_UART0_TX,
|
||||||
|
.end = IRQ_UART0_TX,
|
||||||
|
.flags = IORESOURCE_IRQ,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
.start = IRQ_UART0_RX,
|
.start = IRQ_UART0_RX,
|
||||||
.end = IRQ_UART0_RX+1,
|
.end = IRQ_UART0_RX,
|
||||||
.flags = IORESOURCE_IRQ,
|
.flags = IORESOURCE_IRQ,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -177,9 +182,14 @@ static struct resource bfin_uart1_resources[] = {
|
|||||||
.end = UART1_RBR+2,
|
.end = UART1_RBR+2,
|
||||||
.flags = IORESOURCE_MEM,
|
.flags = IORESOURCE_MEM,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
.start = IRQ_UART1_TX,
|
||||||
|
.end = IRQ_UART1_TX,
|
||||||
|
.flags = IORESOURCE_IRQ,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
.start = IRQ_UART1_RX,
|
.start = IRQ_UART1_RX,
|
||||||
.end = IRQ_UART1_RX+1,
|
.end = IRQ_UART1_RX,
|
||||||
.flags = IORESOURCE_IRQ,
|
.flags = IORESOURCE_IRQ,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -236,9 +246,14 @@ static struct resource bfin_uart2_resources[] = {
|
|||||||
.end = UART2_RBR+2,
|
.end = UART2_RBR+2,
|
||||||
.flags = IORESOURCE_MEM,
|
.flags = IORESOURCE_MEM,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
.start = IRQ_UART2_TX,
|
||||||
|
.end = IRQ_UART2_TX,
|
||||||
|
.flags = IORESOURCE_IRQ,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
.start = IRQ_UART2_RX,
|
.start = IRQ_UART2_RX,
|
||||||
.end = IRQ_UART2_RX+1,
|
.end = IRQ_UART2_RX,
|
||||||
.flags = IORESOURCE_IRQ,
|
.flags = IORESOURCE_IRQ,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -279,9 +294,14 @@ static struct resource bfin_uart3_resources[] = {
|
|||||||
.end = UART3_RBR+2,
|
.end = UART3_RBR+2,
|
||||||
.flags = IORESOURCE_MEM,
|
.flags = IORESOURCE_MEM,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
.start = IRQ_UART3_TX,
|
||||||
|
.end = IRQ_UART3_TX,
|
||||||
|
.flags = IORESOURCE_IRQ,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
.start = IRQ_UART3_RX,
|
.start = IRQ_UART3_RX,
|
||||||
.end = IRQ_UART3_RX+1,
|
.end = IRQ_UART3_RX,
|
||||||
.flags = IORESOURCE_IRQ,
|
.flags = IORESOURCE_IRQ,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -240,9 +240,14 @@ static struct resource bfin_uart0_resources[] = {
|
|||||||
.end = UART0_RBR+2,
|
.end = UART0_RBR+2,
|
||||||
.flags = IORESOURCE_MEM,
|
.flags = IORESOURCE_MEM,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
.start = IRQ_UART0_TX,
|
||||||
|
.end = IRQ_UART0_TX,
|
||||||
|
.flags = IORESOURCE_IRQ,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
.start = IRQ_UART0_RX,
|
.start = IRQ_UART0_RX,
|
||||||
.end = IRQ_UART0_RX+1,
|
.end = IRQ_UART0_RX,
|
||||||
.flags = IORESOURCE_IRQ,
|
.flags = IORESOURCE_IRQ,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -283,9 +288,14 @@ static struct resource bfin_uart1_resources[] = {
|
|||||||
.end = UART1_RBR+2,
|
.end = UART1_RBR+2,
|
||||||
.flags = IORESOURCE_MEM,
|
.flags = IORESOURCE_MEM,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
.start = IRQ_UART1_TX,
|
||||||
|
.end = IRQ_UART1_TX,
|
||||||
|
.flags = IORESOURCE_IRQ,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
.start = IRQ_UART1_RX,
|
.start = IRQ_UART1_RX,
|
||||||
.end = IRQ_UART1_RX+1,
|
.end = IRQ_UART1_RX,
|
||||||
.flags = IORESOURCE_IRQ,
|
.flags = IORESOURCE_IRQ,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -342,9 +352,14 @@ static struct resource bfin_uart2_resources[] = {
|
|||||||
.end = UART2_RBR+2,
|
.end = UART2_RBR+2,
|
||||||
.flags = IORESOURCE_MEM,
|
.flags = IORESOURCE_MEM,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
.start = IRQ_UART2_TX,
|
||||||
|
.end = IRQ_UART2_TX,
|
||||||
|
.flags = IORESOURCE_IRQ,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
.start = IRQ_UART2_RX,
|
.start = IRQ_UART2_RX,
|
||||||
.end = IRQ_UART2_RX+1,
|
.end = IRQ_UART2_RX,
|
||||||
.flags = IORESOURCE_IRQ,
|
.flags = IORESOURCE_IRQ,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -385,9 +400,14 @@ static struct resource bfin_uart3_resources[] = {
|
|||||||
.end = UART3_RBR+2,
|
.end = UART3_RBR+2,
|
||||||
.flags = IORESOURCE_MEM,
|
.flags = IORESOURCE_MEM,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
.start = IRQ_UART3_TX,
|
||||||
|
.end = IRQ_UART3_TX,
|
||||||
|
.flags = IORESOURCE_IRQ,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
.start = IRQ_UART3_RX,
|
.start = IRQ_UART3_RX,
|
||||||
.end = IRQ_UART3_RX+1,
|
.end = IRQ_UART3_RX,
|
||||||
.flags = IORESOURCE_IRQ,
|
.flags = IORESOURCE_IRQ,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -202,9 +202,14 @@ static struct resource bfin_uart0_resources[] = {
|
|||||||
.end = BFIN_UART_GCTL + 2,
|
.end = BFIN_UART_GCTL + 2,
|
||||||
.flags = IORESOURCE_MEM,
|
.flags = IORESOURCE_MEM,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
.start = IRQ_UART_TX,
|
||||||
|
.end = IRQ_UART_TX,
|
||||||
|
.flags = IORESOURCE_IRQ,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
.start = IRQ_UART_RX,
|
.start = IRQ_UART_RX,
|
||||||
.end = IRQ_UART_RX + 1,
|
.end = IRQ_UART_RX,
|
||||||
.flags = IORESOURCE_IRQ,
|
.flags = IORESOURCE_IRQ,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -276,9 +276,14 @@ static struct resource bfin_uart0_resources[] = {
|
|||||||
.end = BFIN_UART_GCTL+2,
|
.end = BFIN_UART_GCTL+2,
|
||||||
.flags = IORESOURCE_MEM,
|
.flags = IORESOURCE_MEM,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
.start = IRQ_UART_TX,
|
||||||
|
.end = IRQ_UART_TX,
|
||||||
|
.flags = IORESOURCE_IRQ,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
.start = IRQ_UART_RX,
|
.start = IRQ_UART_RX,
|
||||||
.end = IRQ_UART_RX+1,
|
.end = IRQ_UART_RX,
|
||||||
.flags = IORESOURCE_IRQ,
|
.flags = IORESOURCE_IRQ,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -171,9 +171,14 @@ static struct resource bfin_uart0_resources[] = {
|
|||||||
.end = BFIN_UART_GCTL+2,
|
.end = BFIN_UART_GCTL+2,
|
||||||
.flags = IORESOURCE_MEM,
|
.flags = IORESOURCE_MEM,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
.start = IRQ_UART_TX,
|
||||||
|
.end = IRQ_UART_TX,
|
||||||
|
.flags = IORESOURCE_IRQ,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
.start = IRQ_UART_RX,
|
.start = IRQ_UART_RX,
|
||||||
.end = IRQ_UART_RX+1,
|
.end = IRQ_UART_RX,
|
||||||
.flags = IORESOURCE_IRQ,
|
.flags = IORESOURCE_IRQ,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -50,9 +50,14 @@ static struct resource bfin_uart0_resources[] = {
|
|||||||
.end = BFIN_UART_GCTL+2,
|
.end = BFIN_UART_GCTL+2,
|
||||||
.flags = IORESOURCE_MEM,
|
.flags = IORESOURCE_MEM,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
.start = IRQ_UART_TX,
|
||||||
|
.end = IRQ_UART_TX,
|
||||||
|
.flags = IORESOURCE_IRQ,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
.start = IRQ_UART_RX,
|
.start = IRQ_UART_RX,
|
||||||
.end = IRQ_UART_RX+1,
|
.end = IRQ_UART_RX,
|
||||||
.flags = IORESOURCE_IRQ,
|
.flags = IORESOURCE_IRQ,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -4,8 +4,8 @@ config M68K
|
|||||||
select HAVE_IDE
|
select HAVE_IDE
|
||||||
select HAVE_AOUT if MMU
|
select HAVE_AOUT if MMU
|
||||||
select GENERIC_ATOMIC64 if MMU
|
select GENERIC_ATOMIC64 if MMU
|
||||||
select HAVE_GENERIC_HARDIRQS if !MMU
|
select HAVE_GENERIC_HARDIRQS
|
||||||
select GENERIC_IRQ_SHOW if !MMU
|
select GENERIC_IRQ_SHOW
|
||||||
select ARCH_HAVE_NMI_SAFE_CMPXCHG if RMW_INSNS
|
select ARCH_HAVE_NMI_SAFE_CMPXCHG if RMW_INSNS
|
||||||
|
|
||||||
config RWSEM_GENERIC_SPINLOCK
|
config RWSEM_GENERIC_SPINLOCK
|
||||||
|
@ -2,6 +2,15 @@ if MMU
|
|||||||
|
|
||||||
comment "Bus Support"
|
comment "Bus Support"
|
||||||
|
|
||||||
|
config DIO
|
||||||
|
bool "DIO bus support"
|
||||||
|
depends on HP300
|
||||||
|
default y
|
||||||
|
help
|
||||||
|
Say Y here to enable support for the "DIO" expansion bus used in
|
||||||
|
HP300 machines. If you are using such a system you almost certainly
|
||||||
|
want this.
|
||||||
|
|
||||||
config NUBUS
|
config NUBUS
|
||||||
bool
|
bool
|
||||||
depends on MAC
|
depends on MAC
|
||||||
|
@ -24,6 +24,37 @@ config PROC_HARDWARE
|
|||||||
including the model, CPU, MMU, clock speed, BogoMIPS rating,
|
including the model, CPU, MMU, clock speed, BogoMIPS rating,
|
||||||
and memory size.
|
and memory size.
|
||||||
|
|
||||||
|
config NATFEAT
|
||||||
|
bool "ARAnyM emulator support"
|
||||||
|
depends on ATARI
|
||||||
|
help
|
||||||
|
This option enables support for ARAnyM native features, such as
|
||||||
|
access to a disk image as /dev/hda.
|
||||||
|
|
||||||
|
config NFBLOCK
|
||||||
|
tristate "NatFeat block device support"
|
||||||
|
depends on BLOCK && NATFEAT
|
||||||
|
help
|
||||||
|
Say Y to include support for the ARAnyM NatFeat block device
|
||||||
|
which allows direct access to the hard drives without using
|
||||||
|
the hardware emulation.
|
||||||
|
|
||||||
|
config NFCON
|
||||||
|
tristate "NatFeat console driver"
|
||||||
|
depends on NATFEAT
|
||||||
|
help
|
||||||
|
Say Y to include support for the ARAnyM NatFeat console driver
|
||||||
|
which allows the console output to be redirected to the stderr
|
||||||
|
output of ARAnyM.
|
||||||
|
|
||||||
|
config NFETH
|
||||||
|
tristate "NatFeat Ethernet support"
|
||||||
|
depends on ETHERNET && NATFEAT
|
||||||
|
help
|
||||||
|
Say Y to include support for the ARAnyM NatFeat network device
|
||||||
|
which will emulate a regular ethernet device while presenting an
|
||||||
|
ethertap device to the host system.
|
||||||
|
|
||||||
endmenu
|
endmenu
|
||||||
|
|
||||||
menu "Character devices"
|
menu "Character devices"
|
||||||
|
@ -1,43 +1,15 @@
|
|||||||
/*
|
/*
|
||||||
* linux/arch/m68k/amiga/amiints.c -- Amiga Linux interrupt handling code
|
* Amiga Linux interrupt handling code
|
||||||
*
|
*
|
||||||
* This file is subject to the terms and conditions of the GNU General Public
|
* 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
|
* License. See the file COPYING in the main directory of this archive
|
||||||
* for more details.
|
* for more details.
|
||||||
*
|
|
||||||
* 11/07/96: rewritten interrupt handling, irq lists are exists now only for
|
|
||||||
* this sources where it makes sense (VERTB/PORTS/EXTER) and you must
|
|
||||||
* be careful that dev_id for this sources is unique since this the
|
|
||||||
* only possibility to distinguish between different handlers for
|
|
||||||
* free_irq. irq lists also have different irq flags:
|
|
||||||
* - IRQ_FLG_FAST: handler is inserted at top of list (after other
|
|
||||||
* fast handlers)
|
|
||||||
* - IRQ_FLG_SLOW: handler is inserted at bottom of list and before
|
|
||||||
* they're executed irq level is set to the previous
|
|
||||||
* one, but handlers don't need to be reentrant, if
|
|
||||||
* reentrance occurred, slow handlers will be just
|
|
||||||
* called again.
|
|
||||||
* The whole interrupt handling for CIAs is moved to cia.c
|
|
||||||
* /Roman Zippel
|
|
||||||
*
|
|
||||||
* 07/08/99: rewamp of the interrupt handling - we now have two types of
|
|
||||||
* interrupts, normal and fast handlers, fast handlers being
|
|
||||||
* marked with IRQF_DISABLED and runs with all other interrupts
|
|
||||||
* disabled. Normal interrupts disable their own source but
|
|
||||||
* run with all other interrupt sources enabled.
|
|
||||||
* PORTS and EXTER interrupts are always shared even if the
|
|
||||||
* drivers do not explicitly mark this when calling
|
|
||||||
* request_irq which they really should do.
|
|
||||||
* This is similar to the way interrupts are handled on all
|
|
||||||
* other architectures and makes a ton of sense besides
|
|
||||||
* having the advantage of making it easier to share
|
|
||||||
* drivers.
|
|
||||||
* /Jes
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <linux/init.h>
|
#include <linux/init.h>
|
||||||
#include <linux/interrupt.h>
|
#include <linux/interrupt.h>
|
||||||
#include <linux/errno.h>
|
#include <linux/errno.h>
|
||||||
|
#include <linux/irq.h>
|
||||||
|
|
||||||
#include <asm/irq.h>
|
#include <asm/irq.h>
|
||||||
#include <asm/traps.h>
|
#include <asm/traps.h>
|
||||||
@ -45,20 +17,128 @@
|
|||||||
#include <asm/amigaints.h>
|
#include <asm/amigaints.h>
|
||||||
#include <asm/amipcmcia.h>
|
#include <asm/amipcmcia.h>
|
||||||
|
|
||||||
static void amiga_enable_irq(unsigned int irq);
|
|
||||||
static void amiga_disable_irq(unsigned int irq);
|
|
||||||
static irqreturn_t ami_int1(int irq, void *dev_id);
|
|
||||||
static irqreturn_t ami_int3(int irq, void *dev_id);
|
|
||||||
static irqreturn_t ami_int4(int irq, void *dev_id);
|
|
||||||
static irqreturn_t ami_int5(int irq, void *dev_id);
|
|
||||||
|
|
||||||
static struct irq_controller amiga_irq_controller = {
|
/*
|
||||||
|
* Enable/disable a particular machine specific interrupt source.
|
||||||
|
* Note that this may affect other interrupts in case of a shared interrupt.
|
||||||
|
* This function should only be called for a _very_ short time to change some
|
||||||
|
* internal data, that may not be changed by the interrupt at the same time.
|
||||||
|
*/
|
||||||
|
|
||||||
|
static void amiga_irq_enable(struct irq_data *data)
|
||||||
|
{
|
||||||
|
amiga_custom.intena = IF_SETCLR | (1 << (data->irq - IRQ_USER));
|
||||||
|
}
|
||||||
|
|
||||||
|
static void amiga_irq_disable(struct irq_data *data)
|
||||||
|
{
|
||||||
|
amiga_custom.intena = 1 << (data->irq - IRQ_USER);
|
||||||
|
}
|
||||||
|
|
||||||
|
static struct irq_chip amiga_irq_chip = {
|
||||||
.name = "amiga",
|
.name = "amiga",
|
||||||
.lock = __SPIN_LOCK_UNLOCKED(amiga_irq_controller.lock),
|
.irq_enable = amiga_irq_enable,
|
||||||
.enable = amiga_enable_irq,
|
.irq_disable = amiga_irq_disable,
|
||||||
.disable = amiga_disable_irq,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* The builtin Amiga hardware interrupt handlers.
|
||||||
|
*/
|
||||||
|
|
||||||
|
static void ami_int1(unsigned int irq, struct irq_desc *desc)
|
||||||
|
{
|
||||||
|
unsigned short ints = amiga_custom.intreqr & amiga_custom.intenar;
|
||||||
|
|
||||||
|
/* if serial transmit buffer empty, interrupt */
|
||||||
|
if (ints & IF_TBE) {
|
||||||
|
amiga_custom.intreq = IF_TBE;
|
||||||
|
generic_handle_irq(IRQ_AMIGA_TBE);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* if floppy disk transfer complete, interrupt */
|
||||||
|
if (ints & IF_DSKBLK) {
|
||||||
|
amiga_custom.intreq = IF_DSKBLK;
|
||||||
|
generic_handle_irq(IRQ_AMIGA_DSKBLK);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* if software interrupt set, interrupt */
|
||||||
|
if (ints & IF_SOFT) {
|
||||||
|
amiga_custom.intreq = IF_SOFT;
|
||||||
|
generic_handle_irq(IRQ_AMIGA_SOFT);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static void ami_int3(unsigned int irq, struct irq_desc *desc)
|
||||||
|
{
|
||||||
|
unsigned short ints = amiga_custom.intreqr & amiga_custom.intenar;
|
||||||
|
|
||||||
|
/* if a blitter interrupt */
|
||||||
|
if (ints & IF_BLIT) {
|
||||||
|
amiga_custom.intreq = IF_BLIT;
|
||||||
|
generic_handle_irq(IRQ_AMIGA_BLIT);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* if a copper interrupt */
|
||||||
|
if (ints & IF_COPER) {
|
||||||
|
amiga_custom.intreq = IF_COPER;
|
||||||
|
generic_handle_irq(IRQ_AMIGA_COPPER);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* if a vertical blank interrupt */
|
||||||
|
if (ints & IF_VERTB) {
|
||||||
|
amiga_custom.intreq = IF_VERTB;
|
||||||
|
generic_handle_irq(IRQ_AMIGA_VERTB);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static void ami_int4(unsigned int irq, struct irq_desc *desc)
|
||||||
|
{
|
||||||
|
unsigned short ints = amiga_custom.intreqr & amiga_custom.intenar;
|
||||||
|
|
||||||
|
/* if audio 0 interrupt */
|
||||||
|
if (ints & IF_AUD0) {
|
||||||
|
amiga_custom.intreq = IF_AUD0;
|
||||||
|
generic_handle_irq(IRQ_AMIGA_AUD0);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* if audio 1 interrupt */
|
||||||
|
if (ints & IF_AUD1) {
|
||||||
|
amiga_custom.intreq = IF_AUD1;
|
||||||
|
generic_handle_irq(IRQ_AMIGA_AUD1);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* if audio 2 interrupt */
|
||||||
|
if (ints & IF_AUD2) {
|
||||||
|
amiga_custom.intreq = IF_AUD2;
|
||||||
|
generic_handle_irq(IRQ_AMIGA_AUD2);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* if audio 3 interrupt */
|
||||||
|
if (ints & IF_AUD3) {
|
||||||
|
amiga_custom.intreq = IF_AUD3;
|
||||||
|
generic_handle_irq(IRQ_AMIGA_AUD3);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static void ami_int5(unsigned int irq, struct irq_desc *desc)
|
||||||
|
{
|
||||||
|
unsigned short ints = amiga_custom.intreqr & amiga_custom.intenar;
|
||||||
|
|
||||||
|
/* if serial receive buffer full interrupt */
|
||||||
|
if (ints & IF_RBF) {
|
||||||
|
/* acknowledge of IF_RBF must be done by the serial interrupt */
|
||||||
|
generic_handle_irq(IRQ_AMIGA_RBF);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* if a disk sync interrupt */
|
||||||
|
if (ints & IF_DSKSYN) {
|
||||||
|
amiga_custom.intreq = IF_DSKSYN;
|
||||||
|
generic_handle_irq(IRQ_AMIGA_DSKSYN);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* void amiga_init_IRQ(void)
|
* void amiga_init_IRQ(void)
|
||||||
*
|
*
|
||||||
@ -72,16 +152,13 @@ static struct irq_controller amiga_irq_controller = {
|
|||||||
|
|
||||||
void __init amiga_init_IRQ(void)
|
void __init amiga_init_IRQ(void)
|
||||||
{
|
{
|
||||||
if (request_irq(IRQ_AUTO_1, ami_int1, 0, "int1", NULL))
|
m68k_setup_irq_controller(&amiga_irq_chip, handle_simple_irq, IRQ_USER,
|
||||||
pr_err("Couldn't register int%d\n", 1);
|
AMI_STD_IRQS);
|
||||||
if (request_irq(IRQ_AUTO_3, ami_int3, 0, "int3", NULL))
|
|
||||||
pr_err("Couldn't register int%d\n", 3);
|
|
||||||
if (request_irq(IRQ_AUTO_4, ami_int4, 0, "int4", NULL))
|
|
||||||
pr_err("Couldn't register int%d\n", 4);
|
|
||||||
if (request_irq(IRQ_AUTO_5, ami_int5, 0, "int5", NULL))
|
|
||||||
pr_err("Couldn't register int%d\n", 5);
|
|
||||||
|
|
||||||
m68k_setup_irq_controller(&amiga_irq_controller, IRQ_USER, AMI_STD_IRQS);
|
irq_set_chained_handler(IRQ_AUTO_1, ami_int1);
|
||||||
|
irq_set_chained_handler(IRQ_AUTO_3, ami_int3);
|
||||||
|
irq_set_chained_handler(IRQ_AUTO_4, ami_int4);
|
||||||
|
irq_set_chained_handler(IRQ_AUTO_5, ami_int5);
|
||||||
|
|
||||||
/* turn off PCMCIA interrupts */
|
/* turn off PCMCIA interrupts */
|
||||||
if (AMIGAHW_PRESENT(PCMCIA))
|
if (AMIGAHW_PRESENT(PCMCIA))
|
||||||
@ -95,120 +172,3 @@ void __init amiga_init_IRQ(void)
|
|||||||
cia_init_IRQ(&ciaa_base);
|
cia_init_IRQ(&ciaa_base);
|
||||||
cia_init_IRQ(&ciab_base);
|
cia_init_IRQ(&ciab_base);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* Enable/disable a particular machine specific interrupt source.
|
|
||||||
* Note that this may affect other interrupts in case of a shared interrupt.
|
|
||||||
* This function should only be called for a _very_ short time to change some
|
|
||||||
* internal data, that may not be changed by the interrupt at the same time.
|
|
||||||
*/
|
|
||||||
|
|
||||||
static void amiga_enable_irq(unsigned int irq)
|
|
||||||
{
|
|
||||||
amiga_custom.intena = IF_SETCLR | (1 << (irq - IRQ_USER));
|
|
||||||
}
|
|
||||||
|
|
||||||
static void amiga_disable_irq(unsigned int irq)
|
|
||||||
{
|
|
||||||
amiga_custom.intena = 1 << (irq - IRQ_USER);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* The builtin Amiga hardware interrupt handlers.
|
|
||||||
*/
|
|
||||||
|
|
||||||
static irqreturn_t ami_int1(int irq, void *dev_id)
|
|
||||||
{
|
|
||||||
unsigned short ints = amiga_custom.intreqr & amiga_custom.intenar;
|
|
||||||
|
|
||||||
/* if serial transmit buffer empty, interrupt */
|
|
||||||
if (ints & IF_TBE) {
|
|
||||||
amiga_custom.intreq = IF_TBE;
|
|
||||||
m68k_handle_int(IRQ_AMIGA_TBE);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* if floppy disk transfer complete, interrupt */
|
|
||||||
if (ints & IF_DSKBLK) {
|
|
||||||
amiga_custom.intreq = IF_DSKBLK;
|
|
||||||
m68k_handle_int(IRQ_AMIGA_DSKBLK);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* if software interrupt set, interrupt */
|
|
||||||
if (ints & IF_SOFT) {
|
|
||||||
amiga_custom.intreq = IF_SOFT;
|
|
||||||
m68k_handle_int(IRQ_AMIGA_SOFT);
|
|
||||||
}
|
|
||||||
return IRQ_HANDLED;
|
|
||||||
}
|
|
||||||
|
|
||||||
static irqreturn_t ami_int3(int irq, void *dev_id)
|
|
||||||
{
|
|
||||||
unsigned short ints = amiga_custom.intreqr & amiga_custom.intenar;
|
|
||||||
|
|
||||||
/* if a blitter interrupt */
|
|
||||||
if (ints & IF_BLIT) {
|
|
||||||
amiga_custom.intreq = IF_BLIT;
|
|
||||||
m68k_handle_int(IRQ_AMIGA_BLIT);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* if a copper interrupt */
|
|
||||||
if (ints & IF_COPER) {
|
|
||||||
amiga_custom.intreq = IF_COPER;
|
|
||||||
m68k_handle_int(IRQ_AMIGA_COPPER);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* if a vertical blank interrupt */
|
|
||||||
if (ints & IF_VERTB) {
|
|
||||||
amiga_custom.intreq = IF_VERTB;
|
|
||||||
m68k_handle_int(IRQ_AMIGA_VERTB);
|
|
||||||
}
|
|
||||||
return IRQ_HANDLED;
|
|
||||||
}
|
|
||||||
|
|
||||||
static irqreturn_t ami_int4(int irq, void *dev_id)
|
|
||||||
{
|
|
||||||
unsigned short ints = amiga_custom.intreqr & amiga_custom.intenar;
|
|
||||||
|
|
||||||
/* if audio 0 interrupt */
|
|
||||||
if (ints & IF_AUD0) {
|
|
||||||
amiga_custom.intreq = IF_AUD0;
|
|
||||||
m68k_handle_int(IRQ_AMIGA_AUD0);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* if audio 1 interrupt */
|
|
||||||
if (ints & IF_AUD1) {
|
|
||||||
amiga_custom.intreq = IF_AUD1;
|
|
||||||
m68k_handle_int(IRQ_AMIGA_AUD1);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* if audio 2 interrupt */
|
|
||||||
if (ints & IF_AUD2) {
|
|
||||||
amiga_custom.intreq = IF_AUD2;
|
|
||||||
m68k_handle_int(IRQ_AMIGA_AUD2);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* if audio 3 interrupt */
|
|
||||||
if (ints & IF_AUD3) {
|
|
||||||
amiga_custom.intreq = IF_AUD3;
|
|
||||||
m68k_handle_int(IRQ_AMIGA_AUD3);
|
|
||||||
}
|
|
||||||
return IRQ_HANDLED;
|
|
||||||
}
|
|
||||||
|
|
||||||
static irqreturn_t ami_int5(int irq, void *dev_id)
|
|
||||||
{
|
|
||||||
unsigned short ints = amiga_custom.intreqr & amiga_custom.intenar;
|
|
||||||
|
|
||||||
/* if serial receive buffer full interrupt */
|
|
||||||
if (ints & IF_RBF) {
|
|
||||||
/* acknowledge of IF_RBF must be done by the serial interrupt */
|
|
||||||
m68k_handle_int(IRQ_AMIGA_RBF);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* if a disk sync interrupt */
|
|
||||||
if (ints & IF_DSKSYN) {
|
|
||||||
amiga_custom.intreq = IF_DSKSYN;
|
|
||||||
m68k_handle_int(IRQ_AMIGA_DSKSYN);
|
|
||||||
}
|
|
||||||
return IRQ_HANDLED;
|
|
||||||
}
|
|
||||||
|
@ -93,13 +93,14 @@ static irqreturn_t cia_handler(int irq, void *dev_id)
|
|||||||
amiga_custom.intreq = base->int_mask;
|
amiga_custom.intreq = base->int_mask;
|
||||||
for (; ints; mach_irq++, ints >>= 1) {
|
for (; ints; mach_irq++, ints >>= 1) {
|
||||||
if (ints & 1)
|
if (ints & 1)
|
||||||
m68k_handle_int(mach_irq);
|
generic_handle_irq(mach_irq);
|
||||||
}
|
}
|
||||||
return IRQ_HANDLED;
|
return IRQ_HANDLED;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void cia_enable_irq(unsigned int irq)
|
static void cia_irq_enable(struct irq_data *data)
|
||||||
{
|
{
|
||||||
|
unsigned int irq = data->irq;
|
||||||
unsigned char mask;
|
unsigned char mask;
|
||||||
|
|
||||||
if (irq >= IRQ_AMIGA_CIAB) {
|
if (irq >= IRQ_AMIGA_CIAB) {
|
||||||
@ -113,19 +114,20 @@ static void cia_enable_irq(unsigned int irq)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void cia_disable_irq(unsigned int irq)
|
static void cia_irq_disable(struct irq_data *data)
|
||||||
{
|
{
|
||||||
|
unsigned int irq = data->irq;
|
||||||
|
|
||||||
if (irq >= IRQ_AMIGA_CIAB)
|
if (irq >= IRQ_AMIGA_CIAB)
|
||||||
cia_able_irq(&ciab_base, 1 << (irq - IRQ_AMIGA_CIAB));
|
cia_able_irq(&ciab_base, 1 << (irq - IRQ_AMIGA_CIAB));
|
||||||
else
|
else
|
||||||
cia_able_irq(&ciaa_base, 1 << (irq - IRQ_AMIGA_CIAA));
|
cia_able_irq(&ciaa_base, 1 << (irq - IRQ_AMIGA_CIAA));
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct irq_controller cia_irq_controller = {
|
static struct irq_chip cia_irq_chip = {
|
||||||
.name = "cia",
|
.name = "cia",
|
||||||
.lock = __SPIN_LOCK_UNLOCKED(cia_irq_controller.lock),
|
.irq_enable = cia_irq_enable,
|
||||||
.enable = cia_enable_irq,
|
.irq_disable = cia_irq_disable,
|
||||||
.disable = cia_disable_irq,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -134,9 +136,9 @@ static struct irq_controller cia_irq_controller = {
|
|||||||
* into this chain.
|
* into this chain.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static void auto_enable_irq(unsigned int irq)
|
static void auto_irq_enable(struct irq_data *data)
|
||||||
{
|
{
|
||||||
switch (irq) {
|
switch (data->irq) {
|
||||||
case IRQ_AUTO_2:
|
case IRQ_AUTO_2:
|
||||||
amiga_custom.intena = IF_SETCLR | IF_PORTS;
|
amiga_custom.intena = IF_SETCLR | IF_PORTS;
|
||||||
break;
|
break;
|
||||||
@ -146,9 +148,9 @@ static void auto_enable_irq(unsigned int irq)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void auto_disable_irq(unsigned int irq)
|
static void auto_irq_disable(struct irq_data *data)
|
||||||
{
|
{
|
||||||
switch (irq) {
|
switch (data->irq) {
|
||||||
case IRQ_AUTO_2:
|
case IRQ_AUTO_2:
|
||||||
amiga_custom.intena = IF_PORTS;
|
amiga_custom.intena = IF_PORTS;
|
||||||
break;
|
break;
|
||||||
@ -158,24 +160,25 @@ static void auto_disable_irq(unsigned int irq)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct irq_controller auto_irq_controller = {
|
static struct irq_chip auto_irq_chip = {
|
||||||
.name = "auto",
|
.name = "auto",
|
||||||
.lock = __SPIN_LOCK_UNLOCKED(auto_irq_controller.lock),
|
.irq_enable = auto_irq_enable,
|
||||||
.enable = auto_enable_irq,
|
.irq_disable = auto_irq_disable,
|
||||||
.disable = auto_disable_irq,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
void __init cia_init_IRQ(struct ciabase *base)
|
void __init cia_init_IRQ(struct ciabase *base)
|
||||||
{
|
{
|
||||||
m68k_setup_irq_controller(&cia_irq_controller, base->cia_irq, CIA_IRQS);
|
m68k_setup_irq_controller(&cia_irq_chip, handle_simple_irq,
|
||||||
|
base->cia_irq, CIA_IRQS);
|
||||||
|
|
||||||
/* clear any pending interrupt and turn off all interrupts */
|
/* clear any pending interrupt and turn off all interrupts */
|
||||||
cia_set_irq(base, CIA_ICR_ALL);
|
cia_set_irq(base, CIA_ICR_ALL);
|
||||||
cia_able_irq(base, CIA_ICR_ALL);
|
cia_able_irq(base, CIA_ICR_ALL);
|
||||||
|
|
||||||
/* override auto int and install CIA handler */
|
/* override auto int and install CIA handler */
|
||||||
m68k_setup_irq_controller(&auto_irq_controller, base->handler_irq, 1);
|
m68k_setup_irq_controller(&auto_irq_chip, handle_simple_irq,
|
||||||
m68k_irq_startup(base->handler_irq);
|
base->handler_irq, 1);
|
||||||
|
m68k_irq_startup_irq(base->handler_irq);
|
||||||
if (request_irq(base->handler_irq, cia_handler, IRQF_SHARED,
|
if (request_irq(base->handler_irq, cia_handler, IRQF_SHARED,
|
||||||
base->name, base))
|
base->name, base))
|
||||||
pr_err("Couldn't register %s interrupt\n", base->name);
|
pr_err("Couldn't register %s interrupt\n", base->name);
|
||||||
|
@ -1,19 +1,13 @@
|
|||||||
#include <linux/interrupt.h>
|
#include <linux/interrupt.h>
|
||||||
|
#include <linux/irq.h>
|
||||||
|
|
||||||
#include <asm/irq.h>
|
|
||||||
#include <asm/traps.h>
|
#include <asm/traps.h>
|
||||||
#include <asm/apollohw.h>
|
#include <asm/apollohw.h>
|
||||||
|
|
||||||
void dn_process_int(unsigned int irq, struct pt_regs *fp)
|
unsigned int apollo_irq_startup(struct irq_data *data)
|
||||||
{
|
{
|
||||||
__m68k_handle_int(irq, fp);
|
unsigned int irq = data->irq;
|
||||||
|
|
||||||
*(volatile unsigned char *)(pica)=0x20;
|
|
||||||
*(volatile unsigned char *)(picb)=0x20;
|
|
||||||
}
|
|
||||||
|
|
||||||
int apollo_irq_startup(unsigned int irq)
|
|
||||||
{
|
|
||||||
if (irq < 8)
|
if (irq < 8)
|
||||||
*(volatile unsigned char *)(pica+1) &= ~(1 << irq);
|
*(volatile unsigned char *)(pica+1) &= ~(1 << irq);
|
||||||
else
|
else
|
||||||
@ -21,24 +15,33 @@ int apollo_irq_startup(unsigned int irq)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void apollo_irq_shutdown(unsigned int irq)
|
void apollo_irq_shutdown(struct irq_data *data)
|
||||||
{
|
{
|
||||||
|
unsigned int irq = data->irq;
|
||||||
|
|
||||||
if (irq < 8)
|
if (irq < 8)
|
||||||
*(volatile unsigned char *)(pica+1) |= (1 << irq);
|
*(volatile unsigned char *)(pica+1) |= (1 << irq);
|
||||||
else
|
else
|
||||||
*(volatile unsigned char *)(picb+1) |= (1 << (irq - 8));
|
*(volatile unsigned char *)(picb+1) |= (1 << (irq - 8));
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct irq_controller apollo_irq_controller = {
|
void apollo_irq_eoi(struct irq_data *data)
|
||||||
|
{
|
||||||
|
*(volatile unsigned char *)(pica) = 0x20;
|
||||||
|
*(volatile unsigned char *)(picb) = 0x20;
|
||||||
|
}
|
||||||
|
|
||||||
|
static struct irq_chip apollo_irq_chip = {
|
||||||
.name = "apollo",
|
.name = "apollo",
|
||||||
.lock = __SPIN_LOCK_UNLOCKED(apollo_irq_controller.lock),
|
.irq_startup = apollo_irq_startup,
|
||||||
.startup = apollo_irq_startup,
|
.irq_shutdown = apollo_irq_shutdown,
|
||||||
.shutdown = apollo_irq_shutdown,
|
.irq_eoi = apollo_irq_eoi,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
void __init dn_init_IRQ(void)
|
void __init dn_init_IRQ(void)
|
||||||
{
|
{
|
||||||
m68k_setup_user_interrupt(VEC_USER + 96, 16, dn_process_int);
|
m68k_setup_user_interrupt(VEC_USER + 96, 16);
|
||||||
m68k_setup_irq_controller(&apollo_irq_controller, IRQ_APOLLO, 16);
|
m68k_setup_irq_controller(&apollo_irq_chip, handle_fasteoi_irq,
|
||||||
|
IRQ_APOLLO, 16);
|
||||||
}
|
}
|
||||||
|
@ -60,244 +60,8 @@
|
|||||||
* <asm/atariints.h>): Autovector interrupts are 1..7, then follow ST-MFP,
|
* <asm/atariints.h>): Autovector interrupts are 1..7, then follow ST-MFP,
|
||||||
* TT-MFP, SCC, and finally VME interrupts. Vector numbers for the latter can
|
* TT-MFP, SCC, and finally VME interrupts. Vector numbers for the latter can
|
||||||
* be allocated by atari_register_vme_int().
|
* be allocated by atari_register_vme_int().
|
||||||
*
|
|
||||||
* Each interrupt can be of three types:
|
|
||||||
*
|
|
||||||
* - SLOW: The handler runs with all interrupts enabled, except the one it
|
|
||||||
* was called by (to avoid reentering). This should be the usual method.
|
|
||||||
* But it is currently possible only for MFP ints, since only the MFP
|
|
||||||
* offers an easy way to mask interrupts.
|
|
||||||
*
|
|
||||||
* - FAST: The handler runs with all interrupts disabled. This should be used
|
|
||||||
* only for really fast handlers, that just do actions immediately
|
|
||||||
* necessary, and let the rest do a bottom half or task queue.
|
|
||||||
*
|
|
||||||
* - PRIORITIZED: The handler can be interrupted by higher-level ints
|
|
||||||
* (greater IPL, no MFP priorities!). This is the method of choice for ints
|
|
||||||
* which should be slow, but are not from a MFP.
|
|
||||||
*
|
|
||||||
* The feature of more than one handler for one int source is still there, but
|
|
||||||
* only applicable if all handers are of the same type. To not slow down
|
|
||||||
* processing of ints with only one handler by the chaining feature, the list
|
|
||||||
* calling function atari_call_irq_list() is only plugged in at the time the
|
|
||||||
* second handler is registered.
|
|
||||||
*
|
|
||||||
* Implementation notes: For fast-as-possible int handling, there are separate
|
|
||||||
* entry points for each type (slow/fast/prio). The assembler handler calls
|
|
||||||
* the irq directly in the usual case, no C wrapper is involved. In case of
|
|
||||||
* multiple handlers, atari_call_irq_list() is registered as handler and calls
|
|
||||||
* in turn the real irq's. To ease access from assembler level to the irq
|
|
||||||
* function pointer and accompanying data, these two are stored in a separate
|
|
||||||
* array, irq_handler[]. The rest of data (type, name) are put into a second
|
|
||||||
* array, irq_param, that is accessed from C only. For each slow interrupt (32
|
|
||||||
* in all) there are separate handler functions, which makes it possible to
|
|
||||||
* hard-code the MFP register address and value, are necessary to mask the
|
|
||||||
* int. If there'd be only one generic function, lots of calculations would be
|
|
||||||
* needed to determine MFP register and int mask from the vector number :-(
|
|
||||||
*
|
|
||||||
* Furthermore, slow ints may not lower the IPL below its previous value
|
|
||||||
* (before the int happened). This is needed so that an int of class PRIO, on
|
|
||||||
* that this int may be stacked, cannot be reentered. This feature is
|
|
||||||
* implemented as follows: If the stack frame format is 1 (throwaway), the int
|
|
||||||
* is not stacked, and the IPL is anded with 0xfbff, resulting in a new level
|
|
||||||
* 2, which still blocks the HSYNC, but no interrupts of interest. If the
|
|
||||||
* frame format is 0, the int is nested, and the old IPL value can be found in
|
|
||||||
* the sr copy in the frame.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if 0
|
|
||||||
|
|
||||||
#define NUM_INT_SOURCES (8 + NUM_ATARI_SOURCES)
|
|
||||||
|
|
||||||
typedef void (*asm_irq_handler)(void);
|
|
||||||
|
|
||||||
struct irqhandler {
|
|
||||||
irqreturn_t (*handler)(int, void *, struct pt_regs *);
|
|
||||||
void *dev_id;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct irqparam {
|
|
||||||
unsigned long flags;
|
|
||||||
const char *devname;
|
|
||||||
};
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Array with irq's and their parameter data. This array is accessed from low
|
|
||||||
* level assembler code, so an element size of 8 allows usage of index scaling
|
|
||||||
* addressing mode.
|
|
||||||
*/
|
|
||||||
static struct irqhandler irq_handler[NUM_INT_SOURCES];
|
|
||||||
|
|
||||||
/*
|
|
||||||
* This array hold the rest of parameters of int handlers: type
|
|
||||||
* (slow,fast,prio) and the name of the handler. These values are only
|
|
||||||
* accessed from C
|
|
||||||
*/
|
|
||||||
static struct irqparam irq_param[NUM_INT_SOURCES];
|
|
||||||
|
|
||||||
/* check for valid int number (complex, sigh...) */
|
|
||||||
#define IS_VALID_INTNO(n) \
|
|
||||||
((n) > 0 && \
|
|
||||||
/* autovec and ST-MFP ok anyway */ \
|
|
||||||
(((n) < TTMFP_SOURCE_BASE) || \
|
|
||||||
/* TT-MFP ok if present */ \
|
|
||||||
((n) >= TTMFP_SOURCE_BASE && (n) < SCC_SOURCE_BASE && \
|
|
||||||
ATARIHW_PRESENT(TT_MFP)) || \
|
|
||||||
/* SCC ok if present and number even */ \
|
|
||||||
((n) >= SCC_SOURCE_BASE && (n) < VME_SOURCE_BASE && \
|
|
||||||
!((n) & 1) && ATARIHW_PRESENT(SCC)) || \
|
|
||||||
/* greater numbers ok if they are registered VME vectors */ \
|
|
||||||
((n) >= VME_SOURCE_BASE && (n) < VME_SOURCE_BASE + VME_MAX_SOURCES && \
|
|
||||||
free_vme_vec_bitmap & (1 << ((n) - VME_SOURCE_BASE)))))
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Here start the assembler entry points for interrupts
|
|
||||||
*/
|
|
||||||
|
|
||||||
#define IRQ_NAME(nr) atari_slow_irq_##nr##_handler(void)
|
|
||||||
|
|
||||||
#define BUILD_SLOW_IRQ(n) \
|
|
||||||
asmlinkage void IRQ_NAME(n); \
|
|
||||||
/* Dummy function to allow asm with operands. */ \
|
|
||||||
void atari_slow_irq_##n##_dummy (void) { \
|
|
||||||
__asm__ (__ALIGN_STR "\n" \
|
|
||||||
"atari_slow_irq_" #n "_handler:\t" \
|
|
||||||
" addl %6,%5\n" /* preempt_count() += HARDIRQ_OFFSET */ \
|
|
||||||
SAVE_ALL_INT "\n" \
|
|
||||||
GET_CURRENT(%%d0) "\n" \
|
|
||||||
" andb #~(1<<(%c3&7)),%a4:w\n" /* mask this interrupt */ \
|
|
||||||
/* get old IPL from stack frame */ \
|
|
||||||
" bfextu %%sp@(%c2){#5,#3},%%d0\n" \
|
|
||||||
" movew %%sr,%%d1\n" \
|
|
||||||
" bfins %%d0,%%d1{#21,#3}\n" \
|
|
||||||
" movew %%d1,%%sr\n" /* set IPL = previous value */ \
|
|
||||||
" addql #1,%a0\n" \
|
|
||||||
" lea %a1,%%a0\n" \
|
|
||||||
" pea %%sp@\n" /* push addr of frame */ \
|
|
||||||
" movel %%a0@(4),%%sp@-\n" /* push handler data */ \
|
|
||||||
" pea (%c3+8)\n" /* push int number */ \
|
|
||||||
" movel %%a0@,%%a0\n" \
|
|
||||||
" jbsr %%a0@\n" /* call the handler */ \
|
|
||||||
" addql #8,%%sp\n" \
|
|
||||||
" addql #4,%%sp\n" \
|
|
||||||
" orw #0x0600,%%sr\n" \
|
|
||||||
" andw #0xfeff,%%sr\n" /* set IPL = 6 again */ \
|
|
||||||
" orb #(1<<(%c3&7)),%a4:w\n" /* now unmask the int again */ \
|
|
||||||
" jbra ret_from_interrupt\n" \
|
|
||||||
: : "i" (&kstat_cpu(0).irqs[n+8]), "i" (&irq_handler[n+8]), \
|
|
||||||
"n" (PT_OFF_SR), "n" (n), \
|
|
||||||
"i" (n & 8 ? (n & 16 ? &tt_mfp.int_mk_a : &st_mfp.int_mk_a) \
|
|
||||||
: (n & 16 ? &tt_mfp.int_mk_b : &st_mfp.int_mk_b)), \
|
|
||||||
"m" (preempt_count()), "di" (HARDIRQ_OFFSET) \
|
|
||||||
); \
|
|
||||||
for (;;); /* fake noreturn */ \
|
|
||||||
}
|
|
||||||
|
|
||||||
BUILD_SLOW_IRQ(0);
|
|
||||||
BUILD_SLOW_IRQ(1);
|
|
||||||
BUILD_SLOW_IRQ(2);
|
|
||||||
BUILD_SLOW_IRQ(3);
|
|
||||||
BUILD_SLOW_IRQ(4);
|
|
||||||
BUILD_SLOW_IRQ(5);
|
|
||||||
BUILD_SLOW_IRQ(6);
|
|
||||||
BUILD_SLOW_IRQ(7);
|
|
||||||
BUILD_SLOW_IRQ(8);
|
|
||||||
BUILD_SLOW_IRQ(9);
|
|
||||||
BUILD_SLOW_IRQ(10);
|
|
||||||
BUILD_SLOW_IRQ(11);
|
|
||||||
BUILD_SLOW_IRQ(12);
|
|
||||||
BUILD_SLOW_IRQ(13);
|
|
||||||
BUILD_SLOW_IRQ(14);
|
|
||||||
BUILD_SLOW_IRQ(15);
|
|
||||||
BUILD_SLOW_IRQ(16);
|
|
||||||
BUILD_SLOW_IRQ(17);
|
|
||||||
BUILD_SLOW_IRQ(18);
|
|
||||||
BUILD_SLOW_IRQ(19);
|
|
||||||
BUILD_SLOW_IRQ(20);
|
|
||||||
BUILD_SLOW_IRQ(21);
|
|
||||||
BUILD_SLOW_IRQ(22);
|
|
||||||
BUILD_SLOW_IRQ(23);
|
|
||||||
BUILD_SLOW_IRQ(24);
|
|
||||||
BUILD_SLOW_IRQ(25);
|
|
||||||
BUILD_SLOW_IRQ(26);
|
|
||||||
BUILD_SLOW_IRQ(27);
|
|
||||||
BUILD_SLOW_IRQ(28);
|
|
||||||
BUILD_SLOW_IRQ(29);
|
|
||||||
BUILD_SLOW_IRQ(30);
|
|
||||||
BUILD_SLOW_IRQ(31);
|
|
||||||
|
|
||||||
asm_irq_handler slow_handlers[32] = {
|
|
||||||
[0] = atari_slow_irq_0_handler,
|
|
||||||
[1] = atari_slow_irq_1_handler,
|
|
||||||
[2] = atari_slow_irq_2_handler,
|
|
||||||
[3] = atari_slow_irq_3_handler,
|
|
||||||
[4] = atari_slow_irq_4_handler,
|
|
||||||
[5] = atari_slow_irq_5_handler,
|
|
||||||
[6] = atari_slow_irq_6_handler,
|
|
||||||
[7] = atari_slow_irq_7_handler,
|
|
||||||
[8] = atari_slow_irq_8_handler,
|
|
||||||
[9] = atari_slow_irq_9_handler,
|
|
||||||
[10] = atari_slow_irq_10_handler,
|
|
||||||
[11] = atari_slow_irq_11_handler,
|
|
||||||
[12] = atari_slow_irq_12_handler,
|
|
||||||
[13] = atari_slow_irq_13_handler,
|
|
||||||
[14] = atari_slow_irq_14_handler,
|
|
||||||
[15] = atari_slow_irq_15_handler,
|
|
||||||
[16] = atari_slow_irq_16_handler,
|
|
||||||
[17] = atari_slow_irq_17_handler,
|
|
||||||
[18] = atari_slow_irq_18_handler,
|
|
||||||
[19] = atari_slow_irq_19_handler,
|
|
||||||
[20] = atari_slow_irq_20_handler,
|
|
||||||
[21] = atari_slow_irq_21_handler,
|
|
||||||
[22] = atari_slow_irq_22_handler,
|
|
||||||
[23] = atari_slow_irq_23_handler,
|
|
||||||
[24] = atari_slow_irq_24_handler,
|
|
||||||
[25] = atari_slow_irq_25_handler,
|
|
||||||
[26] = atari_slow_irq_26_handler,
|
|
||||||
[27] = atari_slow_irq_27_handler,
|
|
||||||
[28] = atari_slow_irq_28_handler,
|
|
||||||
[29] = atari_slow_irq_29_handler,
|
|
||||||
[30] = atari_slow_irq_30_handler,
|
|
||||||
[31] = atari_slow_irq_31_handler
|
|
||||||
};
|
|
||||||
|
|
||||||
asmlinkage void atari_fast_irq_handler( void );
|
|
||||||
asmlinkage void atari_prio_irq_handler( void );
|
|
||||||
|
|
||||||
/* Dummy function to allow asm with operands. */
|
|
||||||
void atari_fast_prio_irq_dummy (void) {
|
|
||||||
__asm__ (__ALIGN_STR "\n"
|
|
||||||
"atari_fast_irq_handler:\n\t"
|
|
||||||
"orw #0x700,%%sr\n" /* disable all interrupts */
|
|
||||||
"atari_prio_irq_handler:\n\t"
|
|
||||||
"addl %3,%2\n\t" /* preempt_count() += HARDIRQ_OFFSET */
|
|
||||||
SAVE_ALL_INT "\n\t"
|
|
||||||
GET_CURRENT(%%d0) "\n\t"
|
|
||||||
/* get vector number from stack frame and convert to source */
|
|
||||||
"bfextu %%sp@(%c1){#4,#10},%%d0\n\t"
|
|
||||||
"subw #(0x40-8),%%d0\n\t"
|
|
||||||
"jpl 1f\n\t"
|
|
||||||
"addw #(0x40-8-0x18),%%d0\n"
|
|
||||||
"1:\tlea %a0,%%a0\n\t"
|
|
||||||
"addql #1,%%a0@(%%d0:l:4)\n\t"
|
|
||||||
"lea irq_handler,%%a0\n\t"
|
|
||||||
"lea %%a0@(%%d0:l:8),%%a0\n\t"
|
|
||||||
"pea %%sp@\n\t" /* push frame address */
|
|
||||||
"movel %%a0@(4),%%sp@-\n\t" /* push handler data */
|
|
||||||
"movel %%d0,%%sp@-\n\t" /* push int number */
|
|
||||||
"movel %%a0@,%%a0\n\t"
|
|
||||||
"jsr %%a0@\n\t" /* and call the handler */
|
|
||||||
"addql #8,%%sp\n\t"
|
|
||||||
"addql #4,%%sp\n\t"
|
|
||||||
"jbra ret_from_interrupt"
|
|
||||||
: : "i" (&kstat_cpu(0).irqs), "n" (PT_OFF_FORMATVEC),
|
|
||||||
"m" (preempt_count()), "di" (HARDIRQ_OFFSET)
|
|
||||||
);
|
|
||||||
for (;;);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Bitmap for free interrupt vector numbers
|
* Bitmap for free interrupt vector numbers
|
||||||
* (new vectors starting from 0x70 can be allocated by
|
* (new vectors starting from 0x70 can be allocated by
|
||||||
@ -320,31 +84,44 @@ extern void atari_microwire_cmd(int cmd);
|
|||||||
|
|
||||||
extern int atari_SCC_reset_done;
|
extern int atari_SCC_reset_done;
|
||||||
|
|
||||||
static int atari_startup_irq(unsigned int irq)
|
static unsigned int atari_irq_startup(struct irq_data *data)
|
||||||
{
|
{
|
||||||
m68k_irq_startup(irq);
|
unsigned int irq = data->irq;
|
||||||
|
|
||||||
|
m68k_irq_startup(data);
|
||||||
atari_turnon_irq(irq);
|
atari_turnon_irq(irq);
|
||||||
atari_enable_irq(irq);
|
atari_enable_irq(irq);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void atari_shutdown_irq(unsigned int irq)
|
static void atari_irq_shutdown(struct irq_data *data)
|
||||||
{
|
{
|
||||||
|
unsigned int irq = data->irq;
|
||||||
|
|
||||||
atari_disable_irq(irq);
|
atari_disable_irq(irq);
|
||||||
atari_turnoff_irq(irq);
|
atari_turnoff_irq(irq);
|
||||||
m68k_irq_shutdown(irq);
|
m68k_irq_shutdown(data);
|
||||||
|
|
||||||
if (irq == IRQ_AUTO_4)
|
if (irq == IRQ_AUTO_4)
|
||||||
vectors[VEC_INT4] = falcon_hblhandler;
|
vectors[VEC_INT4] = falcon_hblhandler;
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct irq_controller atari_irq_controller = {
|
static void atari_irq_enable(struct irq_data *data)
|
||||||
|
{
|
||||||
|
atari_enable_irq(data->irq);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void atari_irq_disable(struct irq_data *data)
|
||||||
|
{
|
||||||
|
atari_disable_irq(data->irq);
|
||||||
|
}
|
||||||
|
|
||||||
|
static struct irq_chip atari_irq_chip = {
|
||||||
.name = "atari",
|
.name = "atari",
|
||||||
.lock = __SPIN_LOCK_UNLOCKED(atari_irq_controller.lock),
|
.irq_startup = atari_irq_startup,
|
||||||
.startup = atari_startup_irq,
|
.irq_shutdown = atari_irq_shutdown,
|
||||||
.shutdown = atari_shutdown_irq,
|
.irq_enable = atari_irq_enable,
|
||||||
.enable = atari_enable_irq,
|
.irq_disable = atari_irq_disable,
|
||||||
.disable = atari_disable_irq,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -360,8 +137,9 @@ static struct irq_controller atari_irq_controller = {
|
|||||||
|
|
||||||
void __init atari_init_IRQ(void)
|
void __init atari_init_IRQ(void)
|
||||||
{
|
{
|
||||||
m68k_setup_user_interrupt(VEC_USER, NUM_ATARI_SOURCES - IRQ_USER, NULL);
|
m68k_setup_user_interrupt(VEC_USER, NUM_ATARI_SOURCES - IRQ_USER);
|
||||||
m68k_setup_irq_controller(&atari_irq_controller, 1, NUM_ATARI_SOURCES - 1);
|
m68k_setup_irq_controller(&atari_irq_chip, handle_simple_irq, 1,
|
||||||
|
NUM_ATARI_SOURCES - 1);
|
||||||
|
|
||||||
/* Initialize the MFP(s) */
|
/* Initialize the MFP(s) */
|
||||||
|
|
||||||
|
@ -86,7 +86,7 @@ static void bvme6000_get_model(char *model)
|
|||||||
*/
|
*/
|
||||||
static void __init bvme6000_init_IRQ(void)
|
static void __init bvme6000_init_IRQ(void)
|
||||||
{
|
{
|
||||||
m68k_setup_user_interrupt(VEC_USER, 192, NULL);
|
m68k_setup_user_interrupt(VEC_USER, 192);
|
||||||
}
|
}
|
||||||
|
|
||||||
void __init config_bvme6000(void)
|
void __init config_bvme6000(void)
|
||||||
|
@ -70,7 +70,7 @@ void __init hp300_sched_init(irq_handler_t vector)
|
|||||||
|
|
||||||
asm volatile(" movpw %0,%1@(5)" : : "d" (INTVAL), "a" (CLOCKBASE));
|
asm volatile(" movpw %0,%1@(5)" : : "d" (INTVAL), "a" (CLOCKBASE));
|
||||||
|
|
||||||
if (request_irq(IRQ_AUTO_6, hp300_tick, IRQ_FLG_STD, "timer tick", vector))
|
if (request_irq(IRQ_AUTO_6, hp300_tick, 0, "timer tick", vector))
|
||||||
pr_err("Couldn't register timer interrupt\n");
|
pr_err("Couldn't register timer interrupt\n");
|
||||||
|
|
||||||
out_8(CLOCKBASE + CLKCR2, 0x1); /* select CR1 */
|
out_8(CLOCKBASE + CLKCR2, 0x1); /* select CR1 */
|
||||||
|
@ -18,6 +18,11 @@
|
|||||||
|
|
||||||
#ifdef CONFIG_MMU
|
#ifdef CONFIG_MMU
|
||||||
|
|
||||||
|
static inline void ack_bad_irq(unsigned int irq)
|
||||||
|
{
|
||||||
|
pr_crit("unexpected IRQ trap at vector %02x\n", irq);
|
||||||
|
}
|
||||||
|
|
||||||
/* entry.S is sensitive to the offsets of these fields */
|
/* entry.S is sensitive to the offsets of these fields */
|
||||||
typedef struct {
|
typedef struct {
|
||||||
unsigned int __softirq_pending;
|
unsigned int __softirq_pending;
|
||||||
|
@ -27,11 +27,6 @@
|
|||||||
|
|
||||||
#ifdef CONFIG_MMU
|
#ifdef CONFIG_MMU
|
||||||
|
|
||||||
#include <linux/linkage.h>
|
|
||||||
#include <linux/hardirq.h>
|
|
||||||
#include <linux/irqreturn.h>
|
|
||||||
#include <linux/spinlock_types.h>
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Interrupt source definitions
|
* Interrupt source definitions
|
||||||
* General interrupt sources are the level 1-7.
|
* General interrupt sources are the level 1-7.
|
||||||
@ -54,10 +49,6 @@
|
|||||||
|
|
||||||
#define IRQ_USER 8
|
#define IRQ_USER 8
|
||||||
|
|
||||||
extern unsigned int irq_canonicalize(unsigned int irq);
|
|
||||||
|
|
||||||
struct pt_regs;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* various flags for request_irq() - the Amiga now uses the standard
|
* various flags for request_irq() - the Amiga now uses the standard
|
||||||
* mechanism like all other architectures - IRQF_DISABLED and
|
* mechanism like all other architectures - IRQF_DISABLED and
|
||||||
@ -71,57 +62,27 @@ struct pt_regs;
|
|||||||
#define IRQ_FLG_STD (0x8000) /* internally used */
|
#define IRQ_FLG_STD (0x8000) /* internally used */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
struct irq_data;
|
||||||
* This structure is used to chain together the ISRs for a particular
|
struct irq_chip;
|
||||||
* interrupt source (if it supports chaining).
|
struct irq_desc;
|
||||||
*/
|
extern unsigned int m68k_irq_startup(struct irq_data *data);
|
||||||
typedef struct irq_node {
|
extern unsigned int m68k_irq_startup_irq(unsigned int irq);
|
||||||
irqreturn_t (*handler)(int, void *);
|
extern void m68k_irq_shutdown(struct irq_data *data);
|
||||||
void *dev_id;
|
extern void m68k_setup_auto_interrupt(void (*handler)(unsigned int,
|
||||||
struct irq_node *next;
|
struct pt_regs *));
|
||||||
unsigned long flags;
|
extern void m68k_setup_user_interrupt(unsigned int vec, unsigned int cnt);
|
||||||
const char *devname;
|
extern void m68k_setup_irq_controller(struct irq_chip *,
|
||||||
} irq_node_t;
|
void (*handle)(unsigned int irq,
|
||||||
|
struct irq_desc *desc),
|
||||||
|
unsigned int irq, unsigned int cnt);
|
||||||
|
|
||||||
/*
|
extern unsigned int irq_canonicalize(unsigned int irq);
|
||||||
* This structure has only 4 elements for speed reasons
|
|
||||||
*/
|
|
||||||
struct irq_handler {
|
|
||||||
int (*handler)(int, void *);
|
|
||||||
unsigned long flags;
|
|
||||||
void *dev_id;
|
|
||||||
const char *devname;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct irq_controller {
|
|
||||||
const char *name;
|
|
||||||
spinlock_t lock;
|
|
||||||
int (*startup)(unsigned int irq);
|
|
||||||
void (*shutdown)(unsigned int irq);
|
|
||||||
void (*enable)(unsigned int irq);
|
|
||||||
void (*disable)(unsigned int irq);
|
|
||||||
};
|
|
||||||
|
|
||||||
extern int m68k_irq_startup(unsigned int);
|
|
||||||
extern void m68k_irq_shutdown(unsigned int);
|
|
||||||
|
|
||||||
/*
|
|
||||||
* This function returns a new irq_node_t
|
|
||||||
*/
|
|
||||||
extern irq_node_t *new_irq_node(void);
|
|
||||||
|
|
||||||
extern void m68k_setup_auto_interrupt(void (*handler)(unsigned int, struct pt_regs *));
|
|
||||||
extern void m68k_setup_user_interrupt(unsigned int vec, unsigned int cnt,
|
|
||||||
void (*handler)(unsigned int, struct pt_regs *));
|
|
||||||
extern void m68k_setup_irq_controller(struct irq_controller *, unsigned int, unsigned int);
|
|
||||||
|
|
||||||
asmlinkage void m68k_handle_int(unsigned int);
|
|
||||||
asmlinkage void __m68k_handle_int(unsigned int, struct pt_regs *);
|
|
||||||
|
|
||||||
#else
|
#else
|
||||||
#define irq_canonicalize(irq) (irq)
|
#define irq_canonicalize(irq) (irq)
|
||||||
#endif /* CONFIG_MMU */
|
#endif /* CONFIG_MMU */
|
||||||
|
|
||||||
asmlinkage void do_IRQ(int irq, struct pt_regs *regs);
|
asmlinkage void do_IRQ(int irq, struct pt_regs *regs);
|
||||||
|
extern atomic_t irq_err_count;
|
||||||
|
|
||||||
#endif /* _M68K_IRQ_H_ */
|
#endif /* _M68K_IRQ_H_ */
|
||||||
|
@ -12,6 +12,8 @@ extern void mac_reset(void);
|
|||||||
extern void mac_poweroff(void);
|
extern void mac_poweroff(void);
|
||||||
extern void mac_init_IRQ(void);
|
extern void mac_init_IRQ(void);
|
||||||
extern int mac_irq_pending(unsigned int);
|
extern int mac_irq_pending(unsigned int);
|
||||||
|
extern void mac_irq_enable(struct irq_data *data);
|
||||||
|
extern void mac_irq_disable(struct irq_data *data);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Floppy driver magic hook - probably shouldn't be here
|
* Floppy driver magic hook - probably shouldn't be here
|
||||||
|
@ -24,6 +24,3 @@
|
|||||||
#define Q40_IRQ10_MASK (1<<5)
|
#define Q40_IRQ10_MASK (1<<5)
|
||||||
#define Q40_IRQ14_MASK (1<<6)
|
#define Q40_IRQ14_MASK (1<<6)
|
||||||
#define Q40_IRQ15_MASK (1<<7)
|
#define Q40_IRQ15_MASK (1<<7)
|
||||||
|
|
||||||
extern unsigned long q40_probe_irq_on (void);
|
|
||||||
extern int q40_probe_irq_off (unsigned long irqs);
|
|
||||||
|
@ -6,16 +6,15 @@ extra-$(CONFIG_MMU) := head.o
|
|||||||
extra-$(CONFIG_SUN3) := sun3-head.o
|
extra-$(CONFIG_SUN3) := sun3-head.o
|
||||||
extra-y += vmlinux.lds
|
extra-y += vmlinux.lds
|
||||||
|
|
||||||
obj-y := entry.o m68k_ksyms.o module.o process.o ptrace.o setup.o signal.o \
|
obj-y := entry.o irq.o m68k_ksyms.o module.o process.o ptrace.o setup.o \
|
||||||
sys_m68k.o syscalltable.o time.o traps.o
|
signal.o sys_m68k.o syscalltable.o time.o traps.o
|
||||||
|
|
||||||
obj-$(CONFIG_MMU) += ints.o devres.o vectors.o
|
obj-$(CONFIG_MMU) += ints.o vectors.o
|
||||||
devres-$(CONFIG_MMU) = ../../../kernel/irq/devres.o
|
|
||||||
|
|
||||||
ifndef CONFIG_MMU_SUN3
|
ifndef CONFIG_MMU_SUN3
|
||||||
obj-y += dma.o
|
obj-y += dma.o
|
||||||
endif
|
endif
|
||||||
ifndef CONFIG_MMU
|
ifndef CONFIG_MMU
|
||||||
obj-y += init_task.o irq.o
|
obj-y += init_task.o
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
@ -48,7 +48,7 @@
|
|||||||
.globl sys_fork, sys_clone, sys_vfork
|
.globl sys_fork, sys_clone, sys_vfork
|
||||||
.globl ret_from_interrupt, bad_interrupt
|
.globl ret_from_interrupt, bad_interrupt
|
||||||
.globl auto_irqhandler_fixup
|
.globl auto_irqhandler_fixup
|
||||||
.globl user_irqvec_fixup, user_irqhandler_fixup
|
.globl user_irqvec_fixup
|
||||||
|
|
||||||
.text
|
.text
|
||||||
ENTRY(buserr)
|
ENTRY(buserr)
|
||||||
@ -207,7 +207,7 @@ ENTRY(auto_inthandler)
|
|||||||
movel %sp,%sp@-
|
movel %sp,%sp@-
|
||||||
movel %d0,%sp@- | put vector # on stack
|
movel %d0,%sp@- | put vector # on stack
|
||||||
auto_irqhandler_fixup = . + 2
|
auto_irqhandler_fixup = . + 2
|
||||||
jsr __m68k_handle_int | process the IRQ
|
jsr do_IRQ | process the IRQ
|
||||||
addql #8,%sp | pop parameters off stack
|
addql #8,%sp | pop parameters off stack
|
||||||
|
|
||||||
ret_from_interrupt:
|
ret_from_interrupt:
|
||||||
@ -240,8 +240,7 @@ user_irqvec_fixup = . + 2
|
|||||||
|
|
||||||
movel %sp,%sp@-
|
movel %sp,%sp@-
|
||||||
movel %d0,%sp@- | put vector # on stack
|
movel %d0,%sp@- | put vector # on stack
|
||||||
user_irqhandler_fixup = . + 2
|
jsr do_IRQ | process the IRQ
|
||||||
jsr __m68k_handle_int | process the IRQ
|
|
||||||
addql #8,%sp | pop parameters off stack
|
addql #8,%sp | pop parameters off stack
|
||||||
|
|
||||||
subqb #1,%curptr@(TASK_INFO+TINFO_PREEMPT+1)
|
subqb #1,%curptr@(TASK_INFO+TINFO_PREEMPT+1)
|
||||||
|
@ -4,25 +4,6 @@
|
|||||||
* This file is subject to the terms and conditions of the GNU General Public
|
* 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
|
* License. See the file COPYING in the main directory of this archive
|
||||||
* for more details.
|
* for more details.
|
||||||
*
|
|
||||||
* 07/03/96: Timer initialization, and thus mach_sched_init(),
|
|
||||||
* removed from request_irq() and moved to init_time().
|
|
||||||
* We should therefore consider renaming our add_isr() and
|
|
||||||
* remove_isr() to request_irq() and free_irq()
|
|
||||||
* respectively, so they are compliant with the other
|
|
||||||
* architectures. /Jes
|
|
||||||
* 11/07/96: Changed all add_/remove_isr() to request_/free_irq() calls.
|
|
||||||
* Removed irq list support, if any machine needs an irq server
|
|
||||||
* it must implement this itself (as it's already done), instead
|
|
||||||
* only default handler are used with mach_default_handler.
|
|
||||||
* request_irq got some flags different from other architectures:
|
|
||||||
* - IRQ_FLG_REPLACE : Replace an existing handler (the default one
|
|
||||||
* can be replaced without this flag)
|
|
||||||
* - IRQ_FLG_LOCK : handler can't be replaced
|
|
||||||
* There are other machine depending flags, see there
|
|
||||||
* If you want to replace a default handler you should know what
|
|
||||||
* you're doing, since it might handle different other irq sources
|
|
||||||
* which must be served /Roman Zippel
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <linux/module.h>
|
#include <linux/module.h>
|
||||||
@ -47,33 +28,22 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
extern u32 auto_irqhandler_fixup[];
|
extern u32 auto_irqhandler_fixup[];
|
||||||
extern u32 user_irqhandler_fixup[];
|
|
||||||
extern u16 user_irqvec_fixup[];
|
extern u16 user_irqvec_fixup[];
|
||||||
|
|
||||||
/* table for system interrupt handlers */
|
|
||||||
static struct irq_node *irq_list[NR_IRQS];
|
|
||||||
static struct irq_controller *irq_controller[NR_IRQS];
|
|
||||||
static int irq_depth[NR_IRQS];
|
|
||||||
|
|
||||||
static int m68k_first_user_vec;
|
static int m68k_first_user_vec;
|
||||||
|
|
||||||
static struct irq_controller auto_irq_controller = {
|
static struct irq_chip auto_irq_chip = {
|
||||||
.name = "auto",
|
.name = "auto",
|
||||||
.lock = __SPIN_LOCK_UNLOCKED(auto_irq_controller.lock),
|
.irq_startup = m68k_irq_startup,
|
||||||
.startup = m68k_irq_startup,
|
.irq_shutdown = m68k_irq_shutdown,
|
||||||
.shutdown = m68k_irq_shutdown,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct irq_controller user_irq_controller = {
|
static struct irq_chip user_irq_chip = {
|
||||||
.name = "user",
|
.name = "user",
|
||||||
.lock = __SPIN_LOCK_UNLOCKED(user_irq_controller.lock),
|
.irq_startup = m68k_irq_startup,
|
||||||
.startup = m68k_irq_startup,
|
.irq_shutdown = m68k_irq_shutdown,
|
||||||
.shutdown = m68k_irq_shutdown,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#define NUM_IRQ_NODES 100
|
|
||||||
static irq_node_t nodes[NUM_IRQ_NODES];
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* void init_IRQ(void)
|
* void init_IRQ(void)
|
||||||
*
|
*
|
||||||
@ -96,7 +66,7 @@ void __init init_IRQ(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
for (i = IRQ_AUTO_1; i <= IRQ_AUTO_7; i++)
|
for (i = IRQ_AUTO_1; i <= IRQ_AUTO_7; i++)
|
||||||
irq_controller[i] = &auto_irq_controller;
|
irq_set_chip_and_handler(i, &auto_irq_chip, handle_simple_irq);
|
||||||
|
|
||||||
mach_init_IRQ();
|
mach_init_IRQ();
|
||||||
}
|
}
|
||||||
@ -106,7 +76,7 @@ void __init init_IRQ(void)
|
|||||||
* @handler: called from auto vector interrupts
|
* @handler: called from auto vector interrupts
|
||||||
*
|
*
|
||||||
* setup the handler to be called from auto vector interrupts instead of the
|
* setup the handler to be called from auto vector interrupts instead of the
|
||||||
* standard __m68k_handle_int(), it will be called with irq numbers in the range
|
* standard do_IRQ(), it will be called with irq numbers in the range
|
||||||
* from IRQ_AUTO_1 - IRQ_AUTO_7.
|
* from IRQ_AUTO_1 - IRQ_AUTO_7.
|
||||||
*/
|
*/
|
||||||
void __init m68k_setup_auto_interrupt(void (*handler)(unsigned int, struct pt_regs *))
|
void __init m68k_setup_auto_interrupt(void (*handler)(unsigned int, struct pt_regs *))
|
||||||
@ -120,217 +90,49 @@ void __init m68k_setup_auto_interrupt(void (*handler)(unsigned int, struct pt_re
|
|||||||
* m68k_setup_user_interrupt
|
* m68k_setup_user_interrupt
|
||||||
* @vec: first user vector interrupt to handle
|
* @vec: first user vector interrupt to handle
|
||||||
* @cnt: number of active user vector interrupts
|
* @cnt: number of active user vector interrupts
|
||||||
* @handler: called from user vector interrupts
|
|
||||||
*
|
*
|
||||||
* setup user vector interrupts, this includes activating the specified range
|
* setup user vector interrupts, this includes activating the specified range
|
||||||
* of interrupts, only then these interrupts can be requested (note: this is
|
* of interrupts, only then these interrupts can be requested (note: this is
|
||||||
* different from auto vector interrupts). An optional handler can be installed
|
* different from auto vector interrupts).
|
||||||
* to be called instead of the default __m68k_handle_int(), it will be called
|
|
||||||
* with irq numbers starting from IRQ_USER.
|
|
||||||
*/
|
*/
|
||||||
void __init m68k_setup_user_interrupt(unsigned int vec, unsigned int cnt,
|
void __init m68k_setup_user_interrupt(unsigned int vec, unsigned int cnt)
|
||||||
void (*handler)(unsigned int, struct pt_regs *))
|
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
BUG_ON(IRQ_USER + cnt > NR_IRQS);
|
BUG_ON(IRQ_USER + cnt > NR_IRQS);
|
||||||
m68k_first_user_vec = vec;
|
m68k_first_user_vec = vec;
|
||||||
for (i = 0; i < cnt; i++)
|
for (i = 0; i < cnt; i++)
|
||||||
irq_controller[IRQ_USER + i] = &user_irq_controller;
|
irq_set_chip(IRQ_USER + i, &user_irq_chip);
|
||||||
*user_irqvec_fixup = vec - IRQ_USER;
|
*user_irqvec_fixup = vec - IRQ_USER;
|
||||||
if (handler)
|
|
||||||
*user_irqhandler_fixup = (u32)handler;
|
|
||||||
flush_icache();
|
flush_icache();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* m68k_setup_irq_controller
|
* m68k_setup_irq_controller
|
||||||
* @contr: irq controller which controls specified irq
|
* @chip: irq chip which controls specified irq
|
||||||
|
* @handle: flow handler which handles specified irq
|
||||||
* @irq: first irq to be managed by the controller
|
* @irq: first irq to be managed by the controller
|
||||||
|
* @cnt: number of irqs to be managed by the controller
|
||||||
*
|
*
|
||||||
* Change the controller for the specified range of irq, which will be used to
|
* Change the controller for the specified range of irq, which will be used to
|
||||||
* manage these irq. auto/user irq already have a default controller, which can
|
* manage these irq. auto/user irq already have a default controller, which can
|
||||||
* be changed as well, but the controller probably should use m68k_irq_startup/
|
* be changed as well, but the controller probably should use m68k_irq_startup/
|
||||||
* m68k_irq_shutdown.
|
* m68k_irq_shutdown.
|
||||||
*/
|
*/
|
||||||
void m68k_setup_irq_controller(struct irq_controller *contr, unsigned int irq,
|
void m68k_setup_irq_controller(struct irq_chip *chip,
|
||||||
|
irq_flow_handler_t handle, unsigned int irq,
|
||||||
unsigned int cnt)
|
unsigned int cnt)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
for (i = 0; i < cnt; i++)
|
for (i = 0; i < cnt; i++) {
|
||||||
irq_controller[irq + i] = contr;
|
irq_set_chip(irq + i, chip);
|
||||||
|
if (handle)
|
||||||
|
irq_set_handler(irq + i, handle);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
irq_node_t *new_irq_node(void)
|
unsigned int m68k_irq_startup_irq(unsigned int irq)
|
||||||
{
|
|
||||||
irq_node_t *node;
|
|
||||||
short i;
|
|
||||||
|
|
||||||
for (node = nodes, i = NUM_IRQ_NODES-1; i >= 0; node++, i--) {
|
|
||||||
if (!node->handler) {
|
|
||||||
memset(node, 0, sizeof(*node));
|
|
||||||
return node;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
printk ("new_irq_node: out of nodes\n");
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
int setup_irq(unsigned int irq, struct irq_node *node)
|
|
||||||
{
|
|
||||||
struct irq_controller *contr;
|
|
||||||
struct irq_node **prev;
|
|
||||||
unsigned long flags;
|
|
||||||
|
|
||||||
if (irq >= NR_IRQS || !(contr = irq_controller[irq])) {
|
|
||||||
printk("%s: Incorrect IRQ %d from %s\n",
|
|
||||||
__func__, irq, node->devname);
|
|
||||||
return -ENXIO;
|
|
||||||
}
|
|
||||||
|
|
||||||
spin_lock_irqsave(&contr->lock, flags);
|
|
||||||
|
|
||||||
prev = irq_list + irq;
|
|
||||||
if (*prev) {
|
|
||||||
/* Can't share interrupts unless both agree to */
|
|
||||||
if (!((*prev)->flags & node->flags & IRQF_SHARED)) {
|
|
||||||
spin_unlock_irqrestore(&contr->lock, flags);
|
|
||||||
return -EBUSY;
|
|
||||||
}
|
|
||||||
while (*prev)
|
|
||||||
prev = &(*prev)->next;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!irq_list[irq]) {
|
|
||||||
if (contr->startup)
|
|
||||||
contr->startup(irq);
|
|
||||||
else
|
|
||||||
contr->enable(irq);
|
|
||||||
}
|
|
||||||
node->next = NULL;
|
|
||||||
*prev = node;
|
|
||||||
|
|
||||||
spin_unlock_irqrestore(&contr->lock, flags);
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
int request_irq(unsigned int irq,
|
|
||||||
irq_handler_t handler,
|
|
||||||
unsigned long flags, const char *devname, void *dev_id)
|
|
||||||
{
|
|
||||||
struct irq_node *node;
|
|
||||||
int res;
|
|
||||||
|
|
||||||
node = new_irq_node();
|
|
||||||
if (!node)
|
|
||||||
return -ENOMEM;
|
|
||||||
|
|
||||||
node->handler = handler;
|
|
||||||
node->flags = flags;
|
|
||||||
node->dev_id = dev_id;
|
|
||||||
node->devname = devname;
|
|
||||||
|
|
||||||
res = setup_irq(irq, node);
|
|
||||||
if (res)
|
|
||||||
node->handler = NULL;
|
|
||||||
|
|
||||||
return res;
|
|
||||||
}
|
|
||||||
|
|
||||||
EXPORT_SYMBOL(request_irq);
|
|
||||||
|
|
||||||
void free_irq(unsigned int irq, void *dev_id)
|
|
||||||
{
|
|
||||||
struct irq_controller *contr;
|
|
||||||
struct irq_node **p, *node;
|
|
||||||
unsigned long flags;
|
|
||||||
|
|
||||||
if (irq >= NR_IRQS || !(contr = irq_controller[irq])) {
|
|
||||||
printk("%s: Incorrect IRQ %d\n", __func__, irq);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
spin_lock_irqsave(&contr->lock, flags);
|
|
||||||
|
|
||||||
p = irq_list + irq;
|
|
||||||
while ((node = *p)) {
|
|
||||||
if (node->dev_id == dev_id)
|
|
||||||
break;
|
|
||||||
p = &node->next;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (node) {
|
|
||||||
*p = node->next;
|
|
||||||
node->handler = NULL;
|
|
||||||
} else
|
|
||||||
printk("%s: Removing probably wrong IRQ %d\n",
|
|
||||||
__func__, irq);
|
|
||||||
|
|
||||||
if (!irq_list[irq]) {
|
|
||||||
if (contr->shutdown)
|
|
||||||
contr->shutdown(irq);
|
|
||||||
else
|
|
||||||
contr->disable(irq);
|
|
||||||
}
|
|
||||||
|
|
||||||
spin_unlock_irqrestore(&contr->lock, flags);
|
|
||||||
}
|
|
||||||
|
|
||||||
EXPORT_SYMBOL(free_irq);
|
|
||||||
|
|
||||||
void enable_irq(unsigned int irq)
|
|
||||||
{
|
|
||||||
struct irq_controller *contr;
|
|
||||||
unsigned long flags;
|
|
||||||
|
|
||||||
if (irq >= NR_IRQS || !(contr = irq_controller[irq])) {
|
|
||||||
printk("%s: Incorrect IRQ %d\n",
|
|
||||||
__func__, irq);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
spin_lock_irqsave(&contr->lock, flags);
|
|
||||||
if (irq_depth[irq]) {
|
|
||||||
if (!--irq_depth[irq]) {
|
|
||||||
if (contr->enable)
|
|
||||||
contr->enable(irq);
|
|
||||||
}
|
|
||||||
} else
|
|
||||||
WARN_ON(1);
|
|
||||||
spin_unlock_irqrestore(&contr->lock, flags);
|
|
||||||
}
|
|
||||||
|
|
||||||
EXPORT_SYMBOL(enable_irq);
|
|
||||||
|
|
||||||
void disable_irq(unsigned int irq)
|
|
||||||
{
|
|
||||||
struct irq_controller *contr;
|
|
||||||
unsigned long flags;
|
|
||||||
|
|
||||||
if (irq >= NR_IRQS || !(contr = irq_controller[irq])) {
|
|
||||||
printk("%s: Incorrect IRQ %d\n",
|
|
||||||
__func__, irq);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
spin_lock_irqsave(&contr->lock, flags);
|
|
||||||
if (!irq_depth[irq]++) {
|
|
||||||
if (contr->disable)
|
|
||||||
contr->disable(irq);
|
|
||||||
}
|
|
||||||
spin_unlock_irqrestore(&contr->lock, flags);
|
|
||||||
}
|
|
||||||
|
|
||||||
EXPORT_SYMBOL(disable_irq);
|
|
||||||
|
|
||||||
void disable_irq_nosync(unsigned int irq) __attribute__((alias("disable_irq")));
|
|
||||||
|
|
||||||
EXPORT_SYMBOL(disable_irq_nosync);
|
|
||||||
|
|
||||||
int m68k_irq_startup(unsigned int irq)
|
|
||||||
{
|
{
|
||||||
if (irq <= IRQ_AUTO_7)
|
if (irq <= IRQ_AUTO_7)
|
||||||
vectors[VEC_SPUR + irq] = auto_inthandler;
|
vectors[VEC_SPUR + irq] = auto_inthandler;
|
||||||
@ -339,8 +141,15 @@ int m68k_irq_startup(unsigned int irq)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void m68k_irq_shutdown(unsigned int irq)
|
unsigned int m68k_irq_startup(struct irq_data *data)
|
||||||
{
|
{
|
||||||
|
return m68k_irq_startup_irq(data->irq);
|
||||||
|
}
|
||||||
|
|
||||||
|
void m68k_irq_shutdown(struct irq_data *data)
|
||||||
|
{
|
||||||
|
unsigned int irq = data->irq;
|
||||||
|
|
||||||
if (irq <= IRQ_AUTO_7)
|
if (irq <= IRQ_AUTO_7)
|
||||||
vectors[VEC_SPUR + irq] = bad_inthandler;
|
vectors[VEC_SPUR + irq] = bad_inthandler;
|
||||||
else
|
else
|
||||||
@ -348,33 +157,6 @@ void m68k_irq_shutdown(unsigned int irq)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Do we need these probe functions on the m68k?
|
|
||||||
*
|
|
||||||
* ... may be useful with ISA devices
|
|
||||||
*/
|
|
||||||
unsigned long probe_irq_on (void)
|
|
||||||
{
|
|
||||||
#ifdef CONFIG_Q40
|
|
||||||
if (MACH_IS_Q40)
|
|
||||||
return q40_probe_irq_on();
|
|
||||||
#endif
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
EXPORT_SYMBOL(probe_irq_on);
|
|
||||||
|
|
||||||
int probe_irq_off (unsigned long irqs)
|
|
||||||
{
|
|
||||||
#ifdef CONFIG_Q40
|
|
||||||
if (MACH_IS_Q40)
|
|
||||||
return q40_probe_irq_off(irqs);
|
|
||||||
#endif
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
EXPORT_SYMBOL(probe_irq_off);
|
|
||||||
|
|
||||||
unsigned int irq_canonicalize(unsigned int irq)
|
unsigned int irq_canonicalize(unsigned int irq)
|
||||||
{
|
{
|
||||||
#ifdef CONFIG_Q40
|
#ifdef CONFIG_Q40
|
||||||
@ -386,52 +168,9 @@ unsigned int irq_canonicalize(unsigned int irq)
|
|||||||
|
|
||||||
EXPORT_SYMBOL(irq_canonicalize);
|
EXPORT_SYMBOL(irq_canonicalize);
|
||||||
|
|
||||||
asmlinkage void m68k_handle_int(unsigned int irq)
|
|
||||||
{
|
|
||||||
struct irq_node *node;
|
|
||||||
kstat_cpu(0).irqs[irq]++;
|
|
||||||
node = irq_list[irq];
|
|
||||||
do {
|
|
||||||
node->handler(irq, node->dev_id);
|
|
||||||
node = node->next;
|
|
||||||
} while (node);
|
|
||||||
}
|
|
||||||
|
|
||||||
asmlinkage void __m68k_handle_int(unsigned int irq, struct pt_regs *regs)
|
|
||||||
{
|
|
||||||
struct pt_regs *old_regs;
|
|
||||||
old_regs = set_irq_regs(regs);
|
|
||||||
m68k_handle_int(irq);
|
|
||||||
set_irq_regs(old_regs);
|
|
||||||
}
|
|
||||||
|
|
||||||
asmlinkage void handle_badint(struct pt_regs *regs)
|
asmlinkage void handle_badint(struct pt_regs *regs)
|
||||||
{
|
{
|
||||||
kstat_cpu(0).irqs[0]++;
|
atomic_inc(&irq_err_count);
|
||||||
printk("unexpected interrupt from %u\n", regs->vector);
|
pr_warn("unexpected interrupt from %u\n", regs->vector);
|
||||||
}
|
}
|
||||||
|
|
||||||
int show_interrupts(struct seq_file *p, void *v)
|
|
||||||
{
|
|
||||||
struct irq_controller *contr;
|
|
||||||
struct irq_node *node;
|
|
||||||
int i = *(loff_t *) v;
|
|
||||||
|
|
||||||
/* autovector interrupts */
|
|
||||||
if (irq_list[i]) {
|
|
||||||
contr = irq_controller[i];
|
|
||||||
node = irq_list[i];
|
|
||||||
seq_printf(p, "%-8s %3u: %10u %s", contr->name, i, kstat_cpu(0).irqs[i], node->devname);
|
|
||||||
while ((node = node->next))
|
|
||||||
seq_printf(p, ", %s", node->devname);
|
|
||||||
seq_puts(p, "\n");
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef CONFIG_PROC_FS
|
|
||||||
void init_irq_proc(void)
|
|
||||||
{
|
|
||||||
/* Insert /proc/irq driver here */
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
#include <linux/mm.h>
|
#include <linux/mm.h>
|
||||||
#include <linux/delay.h>
|
#include <linux/delay.h>
|
||||||
#include <linux/init.h>
|
#include <linux/init.h>
|
||||||
|
#include <linux/irq.h>
|
||||||
|
|
||||||
#include <asm/traps.h>
|
#include <asm/traps.h>
|
||||||
#include <asm/bootinfo.h>
|
#include <asm/bootinfo.h>
|
||||||
@ -20,9 +21,6 @@
|
|||||||
|
|
||||||
/* #define DEBUG_IRQS */
|
/* #define DEBUG_IRQS */
|
||||||
|
|
||||||
extern void mac_enable_irq(unsigned int);
|
|
||||||
extern void mac_disable_irq(unsigned int);
|
|
||||||
|
|
||||||
int baboon_present;
|
int baboon_present;
|
||||||
static volatile struct baboon *baboon;
|
static volatile struct baboon *baboon;
|
||||||
static unsigned char baboon_disabled;
|
static unsigned char baboon_disabled;
|
||||||
@ -53,7 +51,7 @@ void __init baboon_init(void)
|
|||||||
* Baboon interrupt handler. This works a lot like a VIA.
|
* Baboon interrupt handler. This works a lot like a VIA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static irqreturn_t baboon_irq(int irq, void *dev_id)
|
static void baboon_irq(unsigned int irq, struct irq_desc *desc)
|
||||||
{
|
{
|
||||||
int irq_bit, irq_num;
|
int irq_bit, irq_num;
|
||||||
unsigned char events;
|
unsigned char events;
|
||||||
@ -64,15 +62,16 @@ static irqreturn_t baboon_irq(int irq, void *dev_id)
|
|||||||
(uint) baboon->mb_status);
|
(uint) baboon->mb_status);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (!(events = baboon->mb_ifr & 0x07))
|
events = baboon->mb_ifr & 0x07;
|
||||||
return IRQ_NONE;
|
if (!events)
|
||||||
|
return;
|
||||||
|
|
||||||
irq_num = IRQ_BABOON_0;
|
irq_num = IRQ_BABOON_0;
|
||||||
irq_bit = 1;
|
irq_bit = 1;
|
||||||
do {
|
do {
|
||||||
if (events & irq_bit) {
|
if (events & irq_bit) {
|
||||||
baboon->mb_ifr &= ~irq_bit;
|
baboon->mb_ifr &= ~irq_bit;
|
||||||
m68k_handle_int(irq_num);
|
generic_handle_irq(irq_num);
|
||||||
}
|
}
|
||||||
irq_bit <<= 1;
|
irq_bit <<= 1;
|
||||||
irq_num++;
|
irq_num++;
|
||||||
@ -82,7 +81,6 @@ static irqreturn_t baboon_irq(int irq, void *dev_id)
|
|||||||
/* for now we need to smash all interrupts */
|
/* for now we need to smash all interrupts */
|
||||||
baboon->mb_ifr &= ~events;
|
baboon->mb_ifr &= ~events;
|
||||||
#endif
|
#endif
|
||||||
return IRQ_HANDLED;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -92,8 +90,7 @@ static irqreturn_t baboon_irq(int irq, void *dev_id)
|
|||||||
void __init baboon_register_interrupts(void)
|
void __init baboon_register_interrupts(void)
|
||||||
{
|
{
|
||||||
baboon_disabled = 0;
|
baboon_disabled = 0;
|
||||||
if (request_irq(IRQ_NUBUS_C, baboon_irq, 0, "baboon", (void *)baboon))
|
irq_set_chained_handler(IRQ_NUBUS_C, baboon_irq);
|
||||||
pr_err("Couldn't register baboon interrupt\n");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -111,7 +108,7 @@ void baboon_irq_enable(int irq)
|
|||||||
|
|
||||||
baboon_disabled &= ~(1 << irq_idx);
|
baboon_disabled &= ~(1 << irq_idx);
|
||||||
if (!baboon_disabled)
|
if (!baboon_disabled)
|
||||||
mac_enable_irq(IRQ_NUBUS_C);
|
mac_irq_enable(irq_get_irq_data(IRQ_NUBUS_C));
|
||||||
}
|
}
|
||||||
|
|
||||||
void baboon_irq_disable(int irq)
|
void baboon_irq_disable(int irq)
|
||||||
@ -124,7 +121,7 @@ void baboon_irq_disable(int irq)
|
|||||||
|
|
||||||
baboon_disabled |= 1 << irq_idx;
|
baboon_disabled |= 1 << irq_idx;
|
||||||
if (baboon_disabled)
|
if (baboon_disabled)
|
||||||
mac_disable_irq(IRQ_NUBUS_C);
|
mac_irq_disable(irq_get_irq_data(IRQ_NUBUS_C));
|
||||||
}
|
}
|
||||||
|
|
||||||
void baboon_irq_clear(int irq)
|
void baboon_irq_clear(int irq)
|
||||||
|
@ -305,15 +305,13 @@ void __init iop_register_interrupts(void)
|
|||||||
{
|
{
|
||||||
if (iop_ism_present) {
|
if (iop_ism_present) {
|
||||||
if (oss_present) {
|
if (oss_present) {
|
||||||
if (request_irq(OSS_IRQLEV_IOPISM, iop_ism_irq,
|
if (request_irq(OSS_IRQLEV_IOPISM, iop_ism_irq, 0,
|
||||||
IRQ_FLG_LOCK, "ISM IOP",
|
"ISM IOP", (void *)IOP_NUM_ISM))
|
||||||
(void *) IOP_NUM_ISM))
|
|
||||||
pr_err("Couldn't register ISM IOP interrupt\n");
|
pr_err("Couldn't register ISM IOP interrupt\n");
|
||||||
oss_irq_enable(IRQ_MAC_ADB);
|
oss_irq_enable(IRQ_MAC_ADB);
|
||||||
} else {
|
} else {
|
||||||
if (request_irq(IRQ_VIA2_0, iop_ism_irq,
|
if (request_irq(IRQ_VIA2_0, iop_ism_irq, 0, "ISM IOP",
|
||||||
IRQ_FLG_LOCK|IRQ_FLG_FAST, "ISM IOP",
|
(void *)IOP_NUM_ISM))
|
||||||
(void *) IOP_NUM_ISM))
|
|
||||||
pr_err("Couldn't register ISM IOP interrupt\n");
|
pr_err("Couldn't register ISM IOP interrupt\n");
|
||||||
}
|
}
|
||||||
if (!iop_alive(iop_base[IOP_NUM_ISM])) {
|
if (!iop_alive(iop_base[IOP_NUM_ISM])) {
|
||||||
|
@ -190,14 +190,10 @@ irqreturn_t mac_debug_handler(int, void *);
|
|||||||
|
|
||||||
/* #define DEBUG_MACINTS */
|
/* #define DEBUG_MACINTS */
|
||||||
|
|
||||||
void mac_enable_irq(unsigned int irq);
|
static struct irq_chip mac_irq_chip = {
|
||||||
void mac_disable_irq(unsigned int irq);
|
|
||||||
|
|
||||||
static struct irq_controller mac_irq_controller = {
|
|
||||||
.name = "mac",
|
.name = "mac",
|
||||||
.lock = __SPIN_LOCK_UNLOCKED(mac_irq_controller.lock),
|
.irq_enable = mac_irq_enable,
|
||||||
.enable = mac_enable_irq,
|
.irq_disable = mac_irq_disable,
|
||||||
.disable = mac_disable_irq,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
void __init mac_init_IRQ(void)
|
void __init mac_init_IRQ(void)
|
||||||
@ -205,7 +201,7 @@ void __init mac_init_IRQ(void)
|
|||||||
#ifdef DEBUG_MACINTS
|
#ifdef DEBUG_MACINTS
|
||||||
printk("mac_init_IRQ(): Setting things up...\n");
|
printk("mac_init_IRQ(): Setting things up...\n");
|
||||||
#endif
|
#endif
|
||||||
m68k_setup_irq_controller(&mac_irq_controller, IRQ_USER,
|
m68k_setup_irq_controller(&mac_irq_chip, handle_simple_irq, IRQ_USER,
|
||||||
NUM_MAC_SOURCES - IRQ_USER);
|
NUM_MAC_SOURCES - IRQ_USER);
|
||||||
/* Make sure the SONIC interrupt is cleared or things get ugly */
|
/* Make sure the SONIC interrupt is cleared or things get ugly */
|
||||||
#ifdef SHUTUP_SONIC
|
#ifdef SHUTUP_SONIC
|
||||||
@ -241,16 +237,17 @@ void __init mac_init_IRQ(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* mac_enable_irq - enable an interrupt source
|
* mac_irq_enable - enable an interrupt source
|
||||||
* mac_disable_irq - disable an interrupt source
|
* mac_irq_disable - disable an interrupt source
|
||||||
* mac_clear_irq - clears a pending interrupt
|
* mac_clear_irq - clears a pending interrupt
|
||||||
* mac_pending_irq - Returns the pending status of an IRQ (nonzero = pending)
|
* mac_irq_pending - returns the pending status of an IRQ (nonzero = pending)
|
||||||
*
|
*
|
||||||
* These routines are just dispatchers to the VIA/OSS/PSC routines.
|
* These routines are just dispatchers to the VIA/OSS/PSC routines.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void mac_enable_irq(unsigned int irq)
|
void mac_irq_enable(struct irq_data *data)
|
||||||
{
|
{
|
||||||
|
int irq = data->irq;
|
||||||
int irq_src = IRQ_SRC(irq);
|
int irq_src = IRQ_SRC(irq);
|
||||||
|
|
||||||
switch(irq_src) {
|
switch(irq_src) {
|
||||||
@ -283,8 +280,9 @@ void mac_enable_irq(unsigned int irq)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void mac_disable_irq(unsigned int irq)
|
void mac_irq_disable(struct irq_data *data)
|
||||||
{
|
{
|
||||||
|
int irq = data->irq;
|
||||||
int irq_src = IRQ_SRC(irq);
|
int irq_src = IRQ_SRC(irq);
|
||||||
|
|
||||||
switch(irq_src) {
|
switch(irq_src) {
|
||||||
|
@ -19,6 +19,7 @@
|
|||||||
#include <linux/mm.h>
|
#include <linux/mm.h>
|
||||||
#include <linux/delay.h>
|
#include <linux/delay.h>
|
||||||
#include <linux/init.h>
|
#include <linux/init.h>
|
||||||
|
#include <linux/irq.h>
|
||||||
|
|
||||||
#include <asm/bootinfo.h>
|
#include <asm/bootinfo.h>
|
||||||
#include <asm/macintosh.h>
|
#include <asm/macintosh.h>
|
||||||
@ -29,10 +30,7 @@
|
|||||||
int oss_present;
|
int oss_present;
|
||||||
volatile struct mac_oss *oss;
|
volatile struct mac_oss *oss;
|
||||||
|
|
||||||
static irqreturn_t oss_irq(int, void *);
|
extern void via1_irq(unsigned int irq, struct irq_desc *desc);
|
||||||
static irqreturn_t oss_nubus_irq(int, void *);
|
|
||||||
|
|
||||||
extern irqreturn_t via1_irq(int, void *);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Initialize the OSS
|
* Initialize the OSS
|
||||||
@ -59,26 +57,6 @@ void __init oss_init(void)
|
|||||||
oss->irq_level[OSS_VIA1] = OSS_IRQLEV_VIA1;
|
oss->irq_level[OSS_VIA1] = OSS_IRQLEV_VIA1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* Register the OSS and NuBus interrupt dispatchers.
|
|
||||||
*/
|
|
||||||
|
|
||||||
void __init oss_register_interrupts(void)
|
|
||||||
{
|
|
||||||
if (request_irq(OSS_IRQLEV_SCSI, oss_irq, IRQ_FLG_LOCK,
|
|
||||||
"scsi", (void *) oss))
|
|
||||||
pr_err("Couldn't register %s interrupt\n", "scsi");
|
|
||||||
if (request_irq(OSS_IRQLEV_NUBUS, oss_nubus_irq, IRQ_FLG_LOCK,
|
|
||||||
"nubus", (void *) oss))
|
|
||||||
pr_err("Couldn't register %s interrupt\n", "nubus");
|
|
||||||
if (request_irq(OSS_IRQLEV_SOUND, oss_irq, IRQ_FLG_LOCK,
|
|
||||||
"sound", (void *) oss))
|
|
||||||
pr_err("Couldn't register %s interrupt\n", "sound");
|
|
||||||
if (request_irq(OSS_IRQLEV_VIA1, via1_irq, IRQ_FLG_LOCK,
|
|
||||||
"via1", (void *) via1))
|
|
||||||
pr_err("Couldn't register %s interrupt\n", "via1");
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Initialize OSS for Nubus access
|
* Initialize OSS for Nubus access
|
||||||
*/
|
*/
|
||||||
@ -92,17 +70,17 @@ void __init oss_nubus_init(void)
|
|||||||
* and SCSI; everything else is routed to its own autovector IRQ.
|
* and SCSI; everything else is routed to its own autovector IRQ.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static irqreturn_t oss_irq(int irq, void *dev_id)
|
static void oss_irq(unsigned int irq, struct irq_desc *desc)
|
||||||
{
|
{
|
||||||
int events;
|
int events;
|
||||||
|
|
||||||
events = oss->irq_pending & (OSS_IP_SOUND|OSS_IP_SCSI);
|
events = oss->irq_pending & (OSS_IP_SOUND|OSS_IP_SCSI);
|
||||||
if (!events)
|
if (!events)
|
||||||
return IRQ_NONE;
|
return;
|
||||||
|
|
||||||
#ifdef DEBUG_IRQS
|
#ifdef DEBUG_IRQS
|
||||||
if ((console_loglevel == 10) && !(events & OSS_IP_SCSI)) {
|
if ((console_loglevel == 10) && !(events & OSS_IP_SCSI)) {
|
||||||
printk("oss_irq: irq %d events = 0x%04X\n", irq,
|
printk("oss_irq: irq %u events = 0x%04X\n", irq,
|
||||||
(int) oss->irq_pending);
|
(int) oss->irq_pending);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@ -113,11 +91,10 @@ static irqreturn_t oss_irq(int irq, void *dev_id)
|
|||||||
/* FIXME: call sound handler */
|
/* FIXME: call sound handler */
|
||||||
} else if (events & OSS_IP_SCSI) {
|
} else if (events & OSS_IP_SCSI) {
|
||||||
oss->irq_pending &= ~OSS_IP_SCSI;
|
oss->irq_pending &= ~OSS_IP_SCSI;
|
||||||
m68k_handle_int(IRQ_MAC_SCSI);
|
generic_handle_irq(IRQ_MAC_SCSI);
|
||||||
} else {
|
} else {
|
||||||
/* FIXME: error check here? */
|
/* FIXME: error check here? */
|
||||||
}
|
}
|
||||||
return IRQ_HANDLED;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -126,13 +103,13 @@ static irqreturn_t oss_irq(int irq, void *dev_id)
|
|||||||
* Unlike the VIA/RBV this is on its own autovector interrupt level.
|
* Unlike the VIA/RBV this is on its own autovector interrupt level.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static irqreturn_t oss_nubus_irq(int irq, void *dev_id)
|
static void oss_nubus_irq(unsigned int irq, struct irq_desc *desc)
|
||||||
{
|
{
|
||||||
int events, irq_bit, i;
|
int events, irq_bit, i;
|
||||||
|
|
||||||
events = oss->irq_pending & OSS_IP_NUBUS;
|
events = oss->irq_pending & OSS_IP_NUBUS;
|
||||||
if (!events)
|
if (!events)
|
||||||
return IRQ_NONE;
|
return;
|
||||||
|
|
||||||
#ifdef DEBUG_NUBUS_INT
|
#ifdef DEBUG_NUBUS_INT
|
||||||
if (console_loglevel > 7) {
|
if (console_loglevel > 7) {
|
||||||
@ -148,10 +125,21 @@ static irqreturn_t oss_nubus_irq(int irq, void *dev_id)
|
|||||||
irq_bit >>= 1;
|
irq_bit >>= 1;
|
||||||
if (events & irq_bit) {
|
if (events & irq_bit) {
|
||||||
oss->irq_pending &= ~irq_bit;
|
oss->irq_pending &= ~irq_bit;
|
||||||
m68k_handle_int(NUBUS_SOURCE_BASE + i);
|
generic_handle_irq(NUBUS_SOURCE_BASE + i);
|
||||||
}
|
}
|
||||||
} while(events & (irq_bit - 1));
|
} while(events & (irq_bit - 1));
|
||||||
return IRQ_HANDLED;
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Register the OSS and NuBus interrupt dispatchers.
|
||||||
|
*/
|
||||||
|
|
||||||
|
void __init oss_register_interrupts(void)
|
||||||
|
{
|
||||||
|
irq_set_chained_handler(OSS_IRQLEV_SCSI, oss_irq);
|
||||||
|
irq_set_chained_handler(OSS_IRQLEV_NUBUS, oss_nubus_irq);
|
||||||
|
irq_set_chained_handler(OSS_IRQLEV_SOUND, oss_irq);
|
||||||
|
irq_set_chained_handler(OSS_IRQLEV_VIA1, via1_irq);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -18,6 +18,7 @@
|
|||||||
#include <linux/mm.h>
|
#include <linux/mm.h>
|
||||||
#include <linux/delay.h>
|
#include <linux/delay.h>
|
||||||
#include <linux/init.h>
|
#include <linux/init.h>
|
||||||
|
#include <linux/irq.h>
|
||||||
|
|
||||||
#include <asm/traps.h>
|
#include <asm/traps.h>
|
||||||
#include <asm/bootinfo.h>
|
#include <asm/bootinfo.h>
|
||||||
@ -30,8 +31,6 @@
|
|||||||
int psc_present;
|
int psc_present;
|
||||||
volatile __u8 *psc;
|
volatile __u8 *psc;
|
||||||
|
|
||||||
irqreturn_t psc_irq(int, void *);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Debugging dump, used in various places to see what's going on.
|
* Debugging dump, used in various places to see what's going on.
|
||||||
*/
|
*/
|
||||||
@ -111,53 +110,53 @@ void __init psc_init(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* Register the PSC interrupt dispatchers for autovector interrupts 3-6.
|
|
||||||
*/
|
|
||||||
|
|
||||||
void __init psc_register_interrupts(void)
|
|
||||||
{
|
|
||||||
if (request_irq(IRQ_AUTO_3, psc_irq, 0, "psc3", (void *) 0x30))
|
|
||||||
pr_err("Couldn't register psc%d interrupt\n", 3);
|
|
||||||
if (request_irq(IRQ_AUTO_4, psc_irq, 0, "psc4", (void *) 0x40))
|
|
||||||
pr_err("Couldn't register psc%d interrupt\n", 4);
|
|
||||||
if (request_irq(IRQ_AUTO_5, psc_irq, 0, "psc5", (void *) 0x50))
|
|
||||||
pr_err("Couldn't register psc%d interrupt\n", 5);
|
|
||||||
if (request_irq(IRQ_AUTO_6, psc_irq, 0, "psc6", (void *) 0x60))
|
|
||||||
pr_err("Couldn't register psc%d interrupt\n", 6);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* PSC interrupt handler. It's a lot like the VIA interrupt handler.
|
* PSC interrupt handler. It's a lot like the VIA interrupt handler.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
irqreturn_t psc_irq(int irq, void *dev_id)
|
static void psc_irq(unsigned int irq, struct irq_desc *desc)
|
||||||
{
|
{
|
||||||
int pIFR = pIFRbase + ((int) dev_id);
|
unsigned int offset = (unsigned int)irq_desc_get_handler_data(desc);
|
||||||
int pIER = pIERbase + ((int) dev_id);
|
int pIFR = pIFRbase + offset;
|
||||||
|
int pIER = pIERbase + offset;
|
||||||
int irq_num;
|
int irq_num;
|
||||||
unsigned char irq_bit, events;
|
unsigned char irq_bit, events;
|
||||||
|
|
||||||
#ifdef DEBUG_IRQS
|
#ifdef DEBUG_IRQS
|
||||||
printk("psc_irq: irq %d pIFR = 0x%02X pIER = 0x%02X\n",
|
printk("psc_irq: irq %u pIFR = 0x%02X pIER = 0x%02X\n",
|
||||||
irq, (int) psc_read_byte(pIFR), (int) psc_read_byte(pIER));
|
irq, (int) psc_read_byte(pIFR), (int) psc_read_byte(pIER));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
events = psc_read_byte(pIFR) & psc_read_byte(pIER) & 0xF;
|
events = psc_read_byte(pIFR) & psc_read_byte(pIER) & 0xF;
|
||||||
if (!events)
|
if (!events)
|
||||||
return IRQ_NONE;
|
return;
|
||||||
|
|
||||||
irq_num = irq << 3;
|
irq_num = irq << 3;
|
||||||
irq_bit = 1;
|
irq_bit = 1;
|
||||||
do {
|
do {
|
||||||
if (events & irq_bit) {
|
if (events & irq_bit) {
|
||||||
psc_write_byte(pIFR, irq_bit);
|
psc_write_byte(pIFR, irq_bit);
|
||||||
m68k_handle_int(irq_num);
|
generic_handle_irq(irq_num);
|
||||||
}
|
}
|
||||||
irq_num++;
|
irq_num++;
|
||||||
irq_bit <<= 1;
|
irq_bit <<= 1;
|
||||||
} while (events >= irq_bit);
|
} while (events >= irq_bit);
|
||||||
return IRQ_HANDLED;
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Register the PSC interrupt dispatchers for autovector interrupts 3-6.
|
||||||
|
*/
|
||||||
|
|
||||||
|
void __init psc_register_interrupts(void)
|
||||||
|
{
|
||||||
|
irq_set_chained_handler(IRQ_AUTO_3, psc_irq);
|
||||||
|
irq_set_handler_data(IRQ_AUTO_3, (void *)0x30);
|
||||||
|
irq_set_chained_handler(IRQ_AUTO_4, psc_irq);
|
||||||
|
irq_set_handler_data(IRQ_AUTO_4, (void *)0x40);
|
||||||
|
irq_set_chained_handler(IRQ_AUTO_5, psc_irq);
|
||||||
|
irq_set_handler_data(IRQ_AUTO_5, (void *)0x50);
|
||||||
|
irq_set_chained_handler(IRQ_AUTO_6, psc_irq);
|
||||||
|
irq_set_handler_data(IRQ_AUTO_6, (void *)0x60);
|
||||||
}
|
}
|
||||||
|
|
||||||
void psc_irq_enable(int irq) {
|
void psc_irq_enable(int irq) {
|
||||||
|
@ -28,6 +28,7 @@
|
|||||||
#include <linux/delay.h>
|
#include <linux/delay.h>
|
||||||
#include <linux/init.h>
|
#include <linux/init.h>
|
||||||
#include <linux/module.h>
|
#include <linux/module.h>
|
||||||
|
#include <linux/irq.h>
|
||||||
|
|
||||||
#include <asm/bootinfo.h>
|
#include <asm/bootinfo.h>
|
||||||
#include <asm/macintosh.h>
|
#include <asm/macintosh.h>
|
||||||
@ -77,9 +78,6 @@ static int gIER,gIFR,gBufA,gBufB;
|
|||||||
static u8 nubus_disabled;
|
static u8 nubus_disabled;
|
||||||
|
|
||||||
void via_debug_dump(void);
|
void via_debug_dump(void);
|
||||||
irqreturn_t via1_irq(int, void *);
|
|
||||||
irqreturn_t via2_irq(int, void *);
|
|
||||||
irqreturn_t via_nubus_irq(int, void *);
|
|
||||||
void via_irq_enable(int irq);
|
void via_irq_enable(int irq);
|
||||||
void via_irq_disable(int irq);
|
void via_irq_disable(int irq);
|
||||||
void via_irq_clear(int irq);
|
void via_irq_clear(int irq);
|
||||||
@ -281,39 +279,10 @@ void __init via_init_clock(irq_handler_t func)
|
|||||||
via1[vT1CL] = MAC_CLOCK_LOW;
|
via1[vT1CL] = MAC_CLOCK_LOW;
|
||||||
via1[vT1CH] = MAC_CLOCK_HIGH;
|
via1[vT1CH] = MAC_CLOCK_HIGH;
|
||||||
|
|
||||||
if (request_irq(IRQ_MAC_TIMER_1, func, IRQ_FLG_LOCK, "timer", func))
|
if (request_irq(IRQ_MAC_TIMER_1, func, 0, "timer", func))
|
||||||
pr_err("Couldn't register %s interrupt\n", "timer");
|
pr_err("Couldn't register %s interrupt\n", "timer");
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* Register the interrupt dispatchers for VIA or RBV machines only.
|
|
||||||
*/
|
|
||||||
|
|
||||||
void __init via_register_interrupts(void)
|
|
||||||
{
|
|
||||||
if (via_alt_mapping) {
|
|
||||||
if (request_irq(IRQ_AUTO_1, via1_irq,
|
|
||||||
IRQ_FLG_LOCK|IRQ_FLG_FAST, "software",
|
|
||||||
(void *) via1))
|
|
||||||
pr_err("Couldn't register %s interrupt\n", "software");
|
|
||||||
if (request_irq(IRQ_AUTO_6, via1_irq,
|
|
||||||
IRQ_FLG_LOCK|IRQ_FLG_FAST, "via1",
|
|
||||||
(void *) via1))
|
|
||||||
pr_err("Couldn't register %s interrupt\n", "via1");
|
|
||||||
} else {
|
|
||||||
if (request_irq(IRQ_AUTO_1, via1_irq,
|
|
||||||
IRQ_FLG_LOCK|IRQ_FLG_FAST, "via1",
|
|
||||||
(void *) via1))
|
|
||||||
pr_err("Couldn't register %s interrupt\n", "via1");
|
|
||||||
}
|
|
||||||
if (request_irq(IRQ_AUTO_2, via2_irq, IRQ_FLG_LOCK|IRQ_FLG_FAST,
|
|
||||||
"via2", (void *) via2))
|
|
||||||
pr_err("Couldn't register %s interrupt\n", "via2");
|
|
||||||
if (request_irq(IRQ_MAC_NUBUS, via_nubus_irq,
|
|
||||||
IRQ_FLG_LOCK|IRQ_FLG_FAST, "nubus", (void *) via2))
|
|
||||||
pr_err("Couldn't register %s interrupt\n", "nubus");
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Debugging dump, used in various places to see what's going on.
|
* Debugging dump, used in various places to see what's going on.
|
||||||
*/
|
*/
|
||||||
@ -446,48 +415,46 @@ void __init via_nubus_init(void)
|
|||||||
* via6522.c :-), disable/pending masks added.
|
* via6522.c :-), disable/pending masks added.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
irqreturn_t via1_irq(int irq, void *dev_id)
|
void via1_irq(unsigned int irq, struct irq_desc *desc)
|
||||||
{
|
{
|
||||||
int irq_num;
|
int irq_num;
|
||||||
unsigned char irq_bit, events;
|
unsigned char irq_bit, events;
|
||||||
|
|
||||||
events = via1[vIFR] & via1[vIER] & 0x7F;
|
events = via1[vIFR] & via1[vIER] & 0x7F;
|
||||||
if (!events)
|
if (!events)
|
||||||
return IRQ_NONE;
|
return;
|
||||||
|
|
||||||
irq_num = VIA1_SOURCE_BASE;
|
irq_num = VIA1_SOURCE_BASE;
|
||||||
irq_bit = 1;
|
irq_bit = 1;
|
||||||
do {
|
do {
|
||||||
if (events & irq_bit) {
|
if (events & irq_bit) {
|
||||||
via1[vIFR] = irq_bit;
|
via1[vIFR] = irq_bit;
|
||||||
m68k_handle_int(irq_num);
|
generic_handle_irq(irq_num);
|
||||||
}
|
}
|
||||||
++irq_num;
|
++irq_num;
|
||||||
irq_bit <<= 1;
|
irq_bit <<= 1;
|
||||||
} while (events >= irq_bit);
|
} while (events >= irq_bit);
|
||||||
return IRQ_HANDLED;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
irqreturn_t via2_irq(int irq, void *dev_id)
|
static void via2_irq(unsigned int irq, struct irq_desc *desc)
|
||||||
{
|
{
|
||||||
int irq_num;
|
int irq_num;
|
||||||
unsigned char irq_bit, events;
|
unsigned char irq_bit, events;
|
||||||
|
|
||||||
events = via2[gIFR] & via2[gIER] & 0x7F;
|
events = via2[gIFR] & via2[gIER] & 0x7F;
|
||||||
if (!events)
|
if (!events)
|
||||||
return IRQ_NONE;
|
return;
|
||||||
|
|
||||||
irq_num = VIA2_SOURCE_BASE;
|
irq_num = VIA2_SOURCE_BASE;
|
||||||
irq_bit = 1;
|
irq_bit = 1;
|
||||||
do {
|
do {
|
||||||
if (events & irq_bit) {
|
if (events & irq_bit) {
|
||||||
via2[gIFR] = irq_bit | rbv_clear;
|
via2[gIFR] = irq_bit | rbv_clear;
|
||||||
m68k_handle_int(irq_num);
|
generic_handle_irq(irq_num);
|
||||||
}
|
}
|
||||||
++irq_num;
|
++irq_num;
|
||||||
irq_bit <<= 1;
|
irq_bit <<= 1;
|
||||||
} while (events >= irq_bit);
|
} while (events >= irq_bit);
|
||||||
return IRQ_HANDLED;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -495,7 +462,7 @@ irqreturn_t via2_irq(int irq, void *dev_id)
|
|||||||
* VIA2 dispatcher as a fast interrupt handler.
|
* VIA2 dispatcher as a fast interrupt handler.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
irqreturn_t via_nubus_irq(int irq, void *dev_id)
|
void via_nubus_irq(unsigned int irq, struct irq_desc *desc)
|
||||||
{
|
{
|
||||||
int slot_irq;
|
int slot_irq;
|
||||||
unsigned char slot_bit, events;
|
unsigned char slot_bit, events;
|
||||||
@ -506,7 +473,7 @@ irqreturn_t via_nubus_irq(int irq, void *dev_id)
|
|||||||
else
|
else
|
||||||
events &= ~via2[vDirA];
|
events &= ~via2[vDirA];
|
||||||
if (!events)
|
if (!events)
|
||||||
return IRQ_NONE;
|
return;
|
||||||
|
|
||||||
do {
|
do {
|
||||||
slot_irq = IRQ_NUBUS_F;
|
slot_irq = IRQ_NUBUS_F;
|
||||||
@ -514,7 +481,7 @@ irqreturn_t via_nubus_irq(int irq, void *dev_id)
|
|||||||
do {
|
do {
|
||||||
if (events & slot_bit) {
|
if (events & slot_bit) {
|
||||||
events &= ~slot_bit;
|
events &= ~slot_bit;
|
||||||
m68k_handle_int(slot_irq);
|
generic_handle_irq(slot_irq);
|
||||||
}
|
}
|
||||||
--slot_irq;
|
--slot_irq;
|
||||||
slot_bit >>= 1;
|
slot_bit >>= 1;
|
||||||
@ -528,7 +495,24 @@ irqreturn_t via_nubus_irq(int irq, void *dev_id)
|
|||||||
else
|
else
|
||||||
events &= ~via2[vDirA];
|
events &= ~via2[vDirA];
|
||||||
} while (events);
|
} while (events);
|
||||||
return IRQ_HANDLED;
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Register the interrupt dispatchers for VIA or RBV machines only.
|
||||||
|
*/
|
||||||
|
|
||||||
|
void __init via_register_interrupts(void)
|
||||||
|
{
|
||||||
|
if (via_alt_mapping) {
|
||||||
|
/* software interrupt */
|
||||||
|
irq_set_chained_handler(IRQ_AUTO_1, via1_irq);
|
||||||
|
/* via1 interrupt */
|
||||||
|
irq_set_chained_handler(IRQ_AUTO_6, via1_irq);
|
||||||
|
} else {
|
||||||
|
irq_set_chained_handler(IRQ_AUTO_1, via1_irq);
|
||||||
|
}
|
||||||
|
irq_set_chained_handler(IRQ_AUTO_2, via2_irq);
|
||||||
|
irq_set_chained_handler(IRQ_MAC_NUBUS, via_nubus_irq);
|
||||||
}
|
}
|
||||||
|
|
||||||
void via_irq_enable(int irq) {
|
void via_irq_enable(int irq) {
|
||||||
|
@ -81,7 +81,7 @@ static void mvme147_get_model(char *model)
|
|||||||
|
|
||||||
void __init mvme147_init_IRQ(void)
|
void __init mvme147_init_IRQ(void)
|
||||||
{
|
{
|
||||||
m68k_setup_user_interrupt(VEC_USER, 192, NULL);
|
m68k_setup_user_interrupt(VEC_USER, 192);
|
||||||
}
|
}
|
||||||
|
|
||||||
void __init config_mvme147(void)
|
void __init config_mvme147(void)
|
||||||
@ -114,8 +114,7 @@ static irqreturn_t mvme147_timer_int (int irq, void *dev_id)
|
|||||||
void mvme147_sched_init (irq_handler_t timer_routine)
|
void mvme147_sched_init (irq_handler_t timer_routine)
|
||||||
{
|
{
|
||||||
tick_handler = timer_routine;
|
tick_handler = timer_routine;
|
||||||
if (request_irq(PCC_IRQ_TIMER1, mvme147_timer_int, IRQ_FLG_REPLACE,
|
if (request_irq(PCC_IRQ_TIMER1, mvme147_timer_int, 0, "timer 1", NULL))
|
||||||
"timer 1", NULL))
|
|
||||||
pr_err("Couldn't register timer interrupt\n");
|
pr_err("Couldn't register timer interrupt\n");
|
||||||
|
|
||||||
/* Init the clock with a value */
|
/* Init the clock with a value */
|
||||||
|
@ -117,7 +117,7 @@ static void mvme16x_get_hardware_list(struct seq_file *m)
|
|||||||
|
|
||||||
static void __init mvme16x_init_IRQ (void)
|
static void __init mvme16x_init_IRQ (void)
|
||||||
{
|
{
|
||||||
m68k_setup_user_interrupt(VEC_USER, 192, NULL);
|
m68k_setup_user_interrupt(VEC_USER, 192);
|
||||||
}
|
}
|
||||||
|
|
||||||
#define pcc2chip ((volatile u_char *)0xfff42000)
|
#define pcc2chip ((volatile u_char *)0xfff42000)
|
||||||
|
@ -15,10 +15,10 @@
|
|||||||
#include <linux/kernel.h>
|
#include <linux/kernel.h>
|
||||||
#include <linux/errno.h>
|
#include <linux/errno.h>
|
||||||
#include <linux/interrupt.h>
|
#include <linux/interrupt.h>
|
||||||
|
#include <linux/irq.h>
|
||||||
|
|
||||||
#include <asm/ptrace.h>
|
#include <asm/ptrace.h>
|
||||||
#include <asm/system.h>
|
#include <asm/system.h>
|
||||||
#include <asm/irq.h>
|
|
||||||
#include <asm/traps.h>
|
#include <asm/traps.h>
|
||||||
|
|
||||||
#include <asm/q40_master.h>
|
#include <asm/q40_master.h>
|
||||||
@ -35,35 +35,36 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
static void q40_irq_handler(unsigned int, struct pt_regs *fp);
|
static void q40_irq_handler(unsigned int, struct pt_regs *fp);
|
||||||
static void q40_enable_irq(unsigned int);
|
static void q40_irq_enable(struct irq_data *data);
|
||||||
static void q40_disable_irq(unsigned int);
|
static void q40_irq_disable(struct irq_data *data);
|
||||||
|
|
||||||
unsigned short q40_ablecount[35];
|
unsigned short q40_ablecount[35];
|
||||||
unsigned short q40_state[35];
|
unsigned short q40_state[35];
|
||||||
|
|
||||||
static int q40_irq_startup(unsigned int irq)
|
static unsigned int q40_irq_startup(struct irq_data *data)
|
||||||
{
|
{
|
||||||
|
unsigned int irq = data->irq;
|
||||||
|
|
||||||
/* test for ISA ints not implemented by HW */
|
/* test for ISA ints not implemented by HW */
|
||||||
switch (irq) {
|
switch (irq) {
|
||||||
case 1: case 2: case 8: case 9:
|
case 1: case 2: case 8: case 9:
|
||||||
case 11: case 12: case 13:
|
case 11: case 12: case 13:
|
||||||
printk("%s: ISA IRQ %d not implemented by HW\n", __func__, irq);
|
printk("%s: ISA IRQ %d not implemented by HW\n", __func__, irq);
|
||||||
return -ENXIO;
|
/* FIXME return -ENXIO; */
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void q40_irq_shutdown(unsigned int irq)
|
static void q40_irq_shutdown(struct irq_data *data)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct irq_controller q40_irq_controller = {
|
static struct irq_chip q40_irq_chip = {
|
||||||
.name = "q40",
|
.name = "q40",
|
||||||
.lock = __SPIN_LOCK_UNLOCKED(q40_irq_controller.lock),
|
.irq_startup = q40_irq_startup,
|
||||||
.startup = q40_irq_startup,
|
.irq_shutdown = q40_irq_shutdown,
|
||||||
.shutdown = q40_irq_shutdown,
|
.irq_enable = q40_irq_enable,
|
||||||
.enable = q40_enable_irq,
|
.irq_disable = q40_irq_disable,
|
||||||
.disable = q40_disable_irq,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -81,13 +82,14 @@ static int disabled;
|
|||||||
|
|
||||||
void __init q40_init_IRQ(void)
|
void __init q40_init_IRQ(void)
|
||||||
{
|
{
|
||||||
m68k_setup_irq_controller(&q40_irq_controller, 1, Q40_IRQ_MAX);
|
m68k_setup_irq_controller(&q40_irq_chip, handle_simple_irq, 1,
|
||||||
|
Q40_IRQ_MAX);
|
||||||
|
|
||||||
/* setup handler for ISA ints */
|
/* setup handler for ISA ints */
|
||||||
m68k_setup_auto_interrupt(q40_irq_handler);
|
m68k_setup_auto_interrupt(q40_irq_handler);
|
||||||
|
|
||||||
m68k_irq_startup(IRQ_AUTO_2);
|
m68k_irq_startup_irq(IRQ_AUTO_2);
|
||||||
m68k_irq_startup(IRQ_AUTO_4);
|
m68k_irq_startup_irq(IRQ_AUTO_4);
|
||||||
|
|
||||||
/* now enable some ints.. */
|
/* now enable some ints.. */
|
||||||
master_outb(1, EXT_ENABLE_REG); /* ISA IRQ 5-15 */
|
master_outb(1, EXT_ENABLE_REG); /* ISA IRQ 5-15 */
|
||||||
@ -218,11 +220,11 @@ static void q40_irq_handler(unsigned int irq, struct pt_regs *fp)
|
|||||||
switch (irq) {
|
switch (irq) {
|
||||||
case 4:
|
case 4:
|
||||||
case 6:
|
case 6:
|
||||||
__m68k_handle_int(Q40_IRQ_SAMPLE, fp);
|
do_IRQ(Q40_IRQ_SAMPLE, fp);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (mir & Q40_IRQ_FRAME_MASK) {
|
if (mir & Q40_IRQ_FRAME_MASK) {
|
||||||
__m68k_handle_int(Q40_IRQ_FRAME, fp);
|
do_IRQ(Q40_IRQ_FRAME, fp);
|
||||||
master_outb(-1, FRAME_CLEAR_REG);
|
master_outb(-1, FRAME_CLEAR_REG);
|
||||||
}
|
}
|
||||||
if ((mir & Q40_IRQ_SER_MASK) || (mir & Q40_IRQ_EXT_MASK)) {
|
if ((mir & Q40_IRQ_SER_MASK) || (mir & Q40_IRQ_EXT_MASK)) {
|
||||||
@ -257,7 +259,7 @@ static void q40_irq_handler(unsigned int irq, struct pt_regs *fp)
|
|||||||
goto iirq;
|
goto iirq;
|
||||||
}
|
}
|
||||||
q40_state[irq] |= IRQ_INPROGRESS;
|
q40_state[irq] |= IRQ_INPROGRESS;
|
||||||
__m68k_handle_int(irq, fp);
|
do_IRQ(irq, fp);
|
||||||
q40_state[irq] &= ~IRQ_INPROGRESS;
|
q40_state[irq] &= ~IRQ_INPROGRESS;
|
||||||
|
|
||||||
/* naively enable everything, if that fails than */
|
/* naively enable everything, if that fails than */
|
||||||
@ -288,25 +290,29 @@ static void q40_irq_handler(unsigned int irq, struct pt_regs *fp)
|
|||||||
mir = master_inb(IIRQ_REG);
|
mir = master_inb(IIRQ_REG);
|
||||||
/* should test whether keyboard irq is really enabled, doing it in defhand */
|
/* should test whether keyboard irq is really enabled, doing it in defhand */
|
||||||
if (mir & Q40_IRQ_KEYB_MASK)
|
if (mir & Q40_IRQ_KEYB_MASK)
|
||||||
__m68k_handle_int(Q40_IRQ_KEYBOARD, fp);
|
do_IRQ(Q40_IRQ_KEYBOARD, fp);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
void q40_enable_irq(unsigned int irq)
|
void q40_irq_enable(struct irq_data *data)
|
||||||
{
|
{
|
||||||
|
unsigned int irq = data->irq;
|
||||||
|
|
||||||
if (irq >= 5 && irq <= 15) {
|
if (irq >= 5 && irq <= 15) {
|
||||||
mext_disabled--;
|
mext_disabled--;
|
||||||
if (mext_disabled > 0)
|
if (mext_disabled > 0)
|
||||||
printk("q40_enable_irq : nested disable/enable\n");
|
printk("q40_irq_enable : nested disable/enable\n");
|
||||||
if (mext_disabled == 0)
|
if (mext_disabled == 0)
|
||||||
master_outb(1, EXT_ENABLE_REG);
|
master_outb(1, EXT_ENABLE_REG);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void q40_disable_irq(unsigned int irq)
|
void q40_irq_disable(struct irq_data *data)
|
||||||
{
|
{
|
||||||
|
unsigned int irq = data->irq;
|
||||||
|
|
||||||
/* disable ISA iqs : only do something if the driver has been
|
/* disable ISA iqs : only do something if the driver has been
|
||||||
* verified to be Q40 "compatible" - right now IDE, NE2K
|
* verified to be Q40 "compatible" - right now IDE, NE2K
|
||||||
* Any driver should not attempt to sleep across disable_irq !!
|
* Any driver should not attempt to sleep across disable_irq !!
|
||||||
@ -319,13 +325,3 @@ void q40_disable_irq(unsigned int irq)
|
|||||||
printk("disable_irq nesting count %d\n",mext_disabled);
|
printk("disable_irq nesting count %d\n",mext_disabled);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned long q40_probe_irq_on(void)
|
|
||||||
{
|
|
||||||
printk("irq probing not working - reconfigure the driver to avoid this\n");
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
int q40_probe_irq_off(unsigned long irqs)
|
|
||||||
{
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
@ -51,25 +51,29 @@ void sun3_disable_irq(unsigned int irq)
|
|||||||
|
|
||||||
static irqreturn_t sun3_int7(int irq, void *dev_id)
|
static irqreturn_t sun3_int7(int irq, void *dev_id)
|
||||||
{
|
{
|
||||||
*sun3_intreg |= (1 << irq);
|
unsigned int cnt;
|
||||||
if (!(kstat_cpu(0).irqs[irq] % 2000))
|
|
||||||
sun3_leds(led_pattern[(kstat_cpu(0).irqs[irq] % 16000) / 2000]);
|
cnt = kstat_irqs_cpu(irq, 0);
|
||||||
|
if (!(cnt % 2000))
|
||||||
|
sun3_leds(led_pattern[cnt % 16000 / 2000]);
|
||||||
return IRQ_HANDLED;
|
return IRQ_HANDLED;
|
||||||
}
|
}
|
||||||
|
|
||||||
static irqreturn_t sun3_int5(int irq, void *dev_id)
|
static irqreturn_t sun3_int5(int irq, void *dev_id)
|
||||||
{
|
{
|
||||||
|
unsigned int cnt;
|
||||||
|
|
||||||
#ifdef CONFIG_SUN3
|
#ifdef CONFIG_SUN3
|
||||||
intersil_clear();
|
intersil_clear();
|
||||||
#endif
|
#endif
|
||||||
*sun3_intreg |= (1 << irq);
|
|
||||||
#ifdef CONFIG_SUN3
|
#ifdef CONFIG_SUN3
|
||||||
intersil_clear();
|
intersil_clear();
|
||||||
#endif
|
#endif
|
||||||
xtime_update(1);
|
xtime_update(1);
|
||||||
update_process_times(user_mode(get_irq_regs()));
|
update_process_times(user_mode(get_irq_regs()));
|
||||||
if (!(kstat_cpu(0).irqs[irq] % 20))
|
cnt = kstat_irqs_cpu(irq, 0);
|
||||||
sun3_leds(led_pattern[(kstat_cpu(0).irqs[irq] % 160) / 20]);
|
if (!(cnt % 20))
|
||||||
|
sun3_leds(led_pattern[cnt % 160 / 20]);
|
||||||
return IRQ_HANDLED;
|
return IRQ_HANDLED;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -79,29 +83,33 @@ static irqreturn_t sun3_vec255(int irq, void *dev_id)
|
|||||||
return IRQ_HANDLED;
|
return IRQ_HANDLED;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void sun3_inthandle(unsigned int irq, struct pt_regs *fp)
|
static void sun3_irq_enable(struct irq_data *data)
|
||||||
{
|
{
|
||||||
*sun3_intreg &= ~(1 << irq);
|
sun3_enable_irq(data->irq);
|
||||||
|
};
|
||||||
|
|
||||||
__m68k_handle_int(irq, fp);
|
static void sun3_irq_disable(struct irq_data *data)
|
||||||
}
|
{
|
||||||
|
sun3_disable_irq(data->irq);
|
||||||
|
};
|
||||||
|
|
||||||
static struct irq_controller sun3_irq_controller = {
|
static struct irq_chip sun3_irq_chip = {
|
||||||
.name = "sun3",
|
.name = "sun3",
|
||||||
.lock = __SPIN_LOCK_UNLOCKED(sun3_irq_controller.lock),
|
.irq_startup = m68k_irq_startup,
|
||||||
.startup = m68k_irq_startup,
|
.irq_shutdown = m68k_irq_shutdown,
|
||||||
.shutdown = m68k_irq_shutdown,
|
.irq_enable = sun3_irq_enable,
|
||||||
.enable = sun3_enable_irq,
|
.irq_disable = sun3_irq_disable,
|
||||||
.disable = sun3_disable_irq,
|
.irq_mask = sun3_irq_disable,
|
||||||
|
.irq_unmask = sun3_irq_enable,
|
||||||
};
|
};
|
||||||
|
|
||||||
void __init sun3_init_IRQ(void)
|
void __init sun3_init_IRQ(void)
|
||||||
{
|
{
|
||||||
*sun3_intreg = 1;
|
*sun3_intreg = 1;
|
||||||
|
|
||||||
m68k_setup_auto_interrupt(sun3_inthandle);
|
m68k_setup_irq_controller(&sun3_irq_chip, handle_level_irq, IRQ_AUTO_1,
|
||||||
m68k_setup_irq_controller(&sun3_irq_controller, IRQ_AUTO_1, 7);
|
7);
|
||||||
m68k_setup_user_interrupt(VEC_USER, 128, NULL);
|
m68k_setup_user_interrupt(VEC_USER, 128);
|
||||||
|
|
||||||
if (request_irq(IRQ_AUTO_5, sun3_int5, 0, "int5", NULL))
|
if (request_irq(IRQ_AUTO_5, sun3_int5, 0, "int5", NULL))
|
||||||
pr_err("Couldn't register %s interrupt\n", "int5");
|
pr_err("Couldn't register %s interrupt\n", "int5");
|
||||||
|
@ -286,11 +286,11 @@ CLEAN_FILES += vmlinux.32 vmlinux.64
|
|||||||
archprepare:
|
archprepare:
|
||||||
ifdef CONFIG_MIPS32_N32
|
ifdef CONFIG_MIPS32_N32
|
||||||
@echo ' Checking missing-syscalls for N32'
|
@echo ' Checking missing-syscalls for N32'
|
||||||
$(Q)$(MAKE) $(build)=. missing-syscalls ccflags-y="-mabi=n32"
|
$(Q)$(MAKE) $(build)=. missing-syscalls missing_syscalls_flags="-mabi=n32"
|
||||||
endif
|
endif
|
||||||
ifdef CONFIG_MIPS32_O32
|
ifdef CONFIG_MIPS32_O32
|
||||||
@echo ' Checking missing-syscalls for O32'
|
@echo ' Checking missing-syscalls for O32'
|
||||||
$(Q)$(MAKE) $(build)=. missing-syscalls ccflags-y="-mabi=32"
|
$(Q)$(MAKE) $(build)=. missing-syscalls missing_syscalls_flags="-mabi=32"
|
||||||
endif
|
endif
|
||||||
|
|
||||||
install:
|
install:
|
||||||
|
@ -17,8 +17,6 @@
|
|||||||
|
|
||||||
static struct map_info flash_map;
|
static struct map_info flash_map;
|
||||||
static struct mtd_info *mymtd;
|
static struct mtd_info *mymtd;
|
||||||
static int nr_parts;
|
|
||||||
static struct mtd_partition *parts;
|
|
||||||
static const char *part_probe_types[] = {
|
static const char *part_probe_types[] = {
|
||||||
"cmdlinepart",
|
"cmdlinepart",
|
||||||
#ifdef CONFIG_MTD_REDBOOT_PARTS
|
#ifdef CONFIG_MTD_REDBOOT_PARTS
|
||||||
@ -61,11 +59,8 @@ static int __init flash_init(void)
|
|||||||
mymtd = do_map_probe("cfi_probe", &flash_map);
|
mymtd = do_map_probe("cfi_probe", &flash_map);
|
||||||
if (mymtd) {
|
if (mymtd) {
|
||||||
mymtd->owner = THIS_MODULE;
|
mymtd->owner = THIS_MODULE;
|
||||||
|
mtd_device_parse_register(mymtd, part_probe_types,
|
||||||
nr_parts = parse_mtd_partitions(mymtd,
|
0, NULL, 0);
|
||||||
part_probe_types,
|
|
||||||
&parts, 0);
|
|
||||||
mtd_device_register(mymtd, parts, nr_parts);
|
|
||||||
} else {
|
} else {
|
||||||
pr_err("Failed to register MTD device for flash\n");
|
pr_err("Failed to register MTD device for flash\n");
|
||||||
}
|
}
|
||||||
|
@ -207,8 +207,9 @@ void octeon_prepare_cpus(unsigned int max_cpus)
|
|||||||
* the other bits alone.
|
* the other bits alone.
|
||||||
*/
|
*/
|
||||||
cvmx_write_csr(CVMX_CIU_MBOX_CLRX(cvmx_get_core_num()), 0xffff);
|
cvmx_write_csr(CVMX_CIU_MBOX_CLRX(cvmx_get_core_num()), 0xffff);
|
||||||
if (request_irq(OCTEON_IRQ_MBOX0, mailbox_interrupt, IRQF_DISABLED,
|
if (request_irq(OCTEON_IRQ_MBOX0, mailbox_interrupt,
|
||||||
"SMP-IPI", mailbox_interrupt)) {
|
IRQF_PERCPU | IRQF_NO_THREAD, "SMP-IPI",
|
||||||
|
mailbox_interrupt)) {
|
||||||
panic("Cannot request_irq(OCTEON_IRQ_MBOX0)\n");
|
panic("Cannot request_irq(OCTEON_IRQ_MBOX0)\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -50,7 +50,7 @@ void __init prom_init(void)
|
|||||||
|
|
||||||
/* arg[0] is "g", the rest is boot parameters */
|
/* arg[0] is "g", the rest is boot parameters */
|
||||||
for (i = 1; i < argc; i++) {
|
for (i = 1; i < argc; i++) {
|
||||||
if (strlen(arcs_cmdline) + strlen(arg[i] + 1)
|
if (strlen(arcs_cmdline) + strlen(arg[i]) + 1
|
||||||
>= sizeof(arcs_cmdline))
|
>= sizeof(arcs_cmdline))
|
||||||
break;
|
break;
|
||||||
strcat(arcs_cmdline, arg[i]);
|
strcat(arcs_cmdline, arg[i]);
|
||||||
|
@ -36,6 +36,8 @@ static inline int gpio_get_value(unsigned gpio)
|
|||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#define gpio_get_value_cansleep gpio_get_value
|
||||||
|
|
||||||
static inline void gpio_set_value(unsigned gpio, int value)
|
static inline void gpio_set_value(unsigned gpio, int value)
|
||||||
{
|
{
|
||||||
switch (bcm47xx_bus_type) {
|
switch (bcm47xx_bus_type) {
|
||||||
@ -54,6 +56,19 @@ static inline void gpio_set_value(unsigned gpio, int value)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#define gpio_set_value_cansleep gpio_set_value
|
||||||
|
|
||||||
|
static inline int gpio_cansleep(unsigned gpio)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline int gpio_is_valid(unsigned gpio)
|
||||||
|
{
|
||||||
|
return gpio < (BCM47XX_EXTIF_GPIO_LINES + BCM47XX_CHIPCO_GPIO_LINES);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
static inline int gpio_direction_input(unsigned gpio)
|
static inline int gpio_direction_input(unsigned gpio)
|
||||||
{
|
{
|
||||||
switch (bcm47xx_bus_type) {
|
switch (bcm47xx_bus_type) {
|
||||||
@ -137,7 +152,4 @@ static inline int gpio_polarity(unsigned gpio, int value)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* cansleep wrappers */
|
|
||||||
#include <asm-generic/gpio.h>
|
|
||||||
|
|
||||||
#endif /* __BCM47XX_GPIO_H */
|
#endif /* __BCM47XX_GPIO_H */
|
||||||
|
@ -365,16 +365,18 @@
|
|||||||
#define __NR_syncfs (__NR_Linux + 342)
|
#define __NR_syncfs (__NR_Linux + 342)
|
||||||
#define __NR_sendmmsg (__NR_Linux + 343)
|
#define __NR_sendmmsg (__NR_Linux + 343)
|
||||||
#define __NR_setns (__NR_Linux + 344)
|
#define __NR_setns (__NR_Linux + 344)
|
||||||
|
#define __NR_process_vm_readv (__NR_Linux + 345)
|
||||||
|
#define __NR_process_vm_writev (__NR_Linux + 346)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Offset of the last Linux o32 flavoured syscall
|
* Offset of the last Linux o32 flavoured syscall
|
||||||
*/
|
*/
|
||||||
#define __NR_Linux_syscalls 344
|
#define __NR_Linux_syscalls 346
|
||||||
|
|
||||||
#endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */
|
#endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */
|
||||||
|
|
||||||
#define __NR_O32_Linux 4000
|
#define __NR_O32_Linux 4000
|
||||||
#define __NR_O32_Linux_syscalls 344
|
#define __NR_O32_Linux_syscalls 346
|
||||||
|
|
||||||
#if _MIPS_SIM == _MIPS_SIM_ABI64
|
#if _MIPS_SIM == _MIPS_SIM_ABI64
|
||||||
|
|
||||||
@ -686,16 +688,18 @@
|
|||||||
#define __NR_syncfs (__NR_Linux + 301)
|
#define __NR_syncfs (__NR_Linux + 301)
|
||||||
#define __NR_sendmmsg (__NR_Linux + 302)
|
#define __NR_sendmmsg (__NR_Linux + 302)
|
||||||
#define __NR_setns (__NR_Linux + 303)
|
#define __NR_setns (__NR_Linux + 303)
|
||||||
|
#define __NR_process_vm_readv (__NR_Linux + 304)
|
||||||
|
#define __NR_process_vm_writev (__NR_Linux + 305)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Offset of the last Linux 64-bit flavoured syscall
|
* Offset of the last Linux 64-bit flavoured syscall
|
||||||
*/
|
*/
|
||||||
#define __NR_Linux_syscalls 303
|
#define __NR_Linux_syscalls 305
|
||||||
|
|
||||||
#endif /* _MIPS_SIM == _MIPS_SIM_ABI64 */
|
#endif /* _MIPS_SIM == _MIPS_SIM_ABI64 */
|
||||||
|
|
||||||
#define __NR_64_Linux 5000
|
#define __NR_64_Linux 5000
|
||||||
#define __NR_64_Linux_syscalls 303
|
#define __NR_64_Linux_syscalls 305
|
||||||
|
|
||||||
#if _MIPS_SIM == _MIPS_SIM_NABI32
|
#if _MIPS_SIM == _MIPS_SIM_NABI32
|
||||||
|
|
||||||
@ -1012,16 +1016,18 @@
|
|||||||
#define __NR_syncfs (__NR_Linux + 306)
|
#define __NR_syncfs (__NR_Linux + 306)
|
||||||
#define __NR_sendmmsg (__NR_Linux + 307)
|
#define __NR_sendmmsg (__NR_Linux + 307)
|
||||||
#define __NR_setns (__NR_Linux + 308)
|
#define __NR_setns (__NR_Linux + 308)
|
||||||
|
#define __NR_process_vm_readv (__NR_Linux + 309)
|
||||||
|
#define __NR_process_vm_writev (__NR_Linux + 310)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Offset of the last N32 flavoured syscall
|
* Offset of the last N32 flavoured syscall
|
||||||
*/
|
*/
|
||||||
#define __NR_Linux_syscalls 308
|
#define __NR_Linux_syscalls 310
|
||||||
|
|
||||||
#endif /* _MIPS_SIM == _MIPS_SIM_NABI32 */
|
#endif /* _MIPS_SIM == _MIPS_SIM_NABI32 */
|
||||||
|
|
||||||
#define __NR_N32_Linux 6000
|
#define __NR_N32_Linux 6000
|
||||||
#define __NR_N32_Linux_syscalls 308
|
#define __NR_N32_Linux_syscalls 310
|
||||||
|
|
||||||
#ifdef __KERNEL__
|
#ifdef __KERNEL__
|
||||||
|
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user