-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'sh-latest' of git://git.kernel.org/pub/scm/linux/kernel…
…/git/lethal/sh-2.6 * 'sh-latest' of git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6: sh: include Migo-R TS driver in Migo-R defconfig sh: correct definitions to access stack pointers sh: Tidy up SH-4A unaligned load support. dma: shdma: NMI support. sh: mach-sdk7786: Handle baseboard NMI source selection. sh: mach-rsk: Add polled GPIO buttons support for RSK+7203. sh: Break out cpuinfo_op procfs bits. sh: Enable optional gpiolib for all CPUs with pinmux tables. sh: migrate SH_CLK_MD to mode pin API. sh: machvec IO death.
- Loading branch information
Showing
32 changed files
with
907 additions
and
752 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
obj-y := fpga.o irq.o setup.o | ||
obj-y := fpga.o irq.o nmi.o setup.o | ||
|
||
obj-$(CONFIG_GENERIC_GPIO) += gpio.o | ||
obj-$(CONFIG_HAVE_SRAM_POOL) += sram.o |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
/* | ||
* SDK7786 FPGA NMI Support. | ||
* | ||
* Copyright (C) 2010 Paul Mundt | ||
* | ||
* This file is subject to the terms and conditions of the GNU General Public | ||
* License. See the file "COPYING" in the main directory of this archive | ||
* for more details. | ||
*/ | ||
#include <linux/init.h> | ||
#include <linux/kernel.h> | ||
#include <linux/string.h> | ||
#include <mach/fpga.h> | ||
|
||
enum { | ||
NMI_MODE_MANUAL, | ||
NMI_MODE_AUX, | ||
NMI_MODE_MASKED, | ||
NMI_MODE_ANY, | ||
NMI_MODE_UNKNOWN, | ||
}; | ||
|
||
/* | ||
* Default to the manual NMI switch. | ||
*/ | ||
static unsigned int __initdata nmi_mode = NMI_MODE_ANY; | ||
|
||
static int __init nmi_mode_setup(char *str) | ||
{ | ||
if (!str) | ||
return 0; | ||
|
||
if (strcmp(str, "manual") == 0) | ||
nmi_mode = NMI_MODE_MANUAL; | ||
else if (strcmp(str, "aux") == 0) | ||
nmi_mode = NMI_MODE_AUX; | ||
else if (strcmp(str, "masked") == 0) | ||
nmi_mode = NMI_MODE_MASKED; | ||
else if (strcmp(str, "any") == 0) | ||
nmi_mode = NMI_MODE_ANY; | ||
else { | ||
nmi_mode = NMI_MODE_UNKNOWN; | ||
pr_warning("Unknown NMI mode %s\n", str); | ||
} | ||
|
||
printk("Set NMI mode to %d\n", nmi_mode); | ||
return 0; | ||
} | ||
early_param("nmi_mode", nmi_mode_setup); | ||
|
||
void __init sdk7786_nmi_init(void) | ||
{ | ||
unsigned int source, mask, tmp; | ||
|
||
switch (nmi_mode) { | ||
case NMI_MODE_MANUAL: | ||
source = NMISR_MAN_NMI; | ||
mask = NMIMR_MAN_NMIM; | ||
break; | ||
case NMI_MODE_AUX: | ||
source = NMISR_AUX_NMI; | ||
mask = NMIMR_AUX_NMIM; | ||
break; | ||
case NMI_MODE_ANY: | ||
source = NMISR_MAN_NMI | NMISR_AUX_NMI; | ||
mask = NMIMR_MAN_NMIM | NMIMR_AUX_NMIM; | ||
break; | ||
case NMI_MODE_MASKED: | ||
case NMI_MODE_UNKNOWN: | ||
default: | ||
source = mask = 0; | ||
break; | ||
} | ||
|
||
/* Set the NMI source */ | ||
tmp = fpga_read_reg(NMISR); | ||
tmp &= ~NMISR_MASK; | ||
tmp |= source; | ||
fpga_write_reg(tmp, NMISR); | ||
|
||
/* And the IRQ masking */ | ||
fpga_write_reg(NMIMR_MASK ^ mask, NMIMR); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.