ASoC: Updates for v3.8

Very quiet release for ASoC really:
 
 - Standardisation of the logging.
 - DT and dmaengine support for Atmel.
 - Support for Wolfson ADSP cores.
 - New drivers for Freescale/iVeia P1022 and Maxim MAX98090.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIcBAABAgAGBQJQutrLAAoJELSic+t+oim9NVUP/3Y1YJjUADTy3w1d6L7zKaQb
 dGVg2cdDBNgXCrIuyb3zUA9yNGrR1c7gzDGjTuiBrJKx917/DrF08pmgHAUv5e9B
 +//xoy2lSwYgnPiWY7p6092+pYNI1hs4PDkV3zucrkkgQovIZOlebUM3MOrSf50+
 abe9uPA11EyqPtmy8HrhtL2iJ3kUOq1y6YNbrDQaaWTL/lwBPS+LzxFAIE36LjN6
 fIUOb8jtSE0rjOVo+jmuytdCnlugaEFfQzOebKMVYpB9LNv6hqISai/baaKFO1Fc
 Jtkjv2xGuUuxP0kY6Fkbjabut7mS8oiVZfGmNUKbYoKStsk1t//xjay/2F0HsNgg
 O7PsK6y1HD/iB87YNaO8Go/6lLSszeQ2WU7Fvynv/CTOpjO/8gjaQz3zDi3HsF5O
 gyh/WYnj9jwnUJkaMDeEyjKBbKDxLuBeXBETVhNIWNgCwnj48TSYQwmGhtefNnS1
 AM/CUrfXVsgCxPn8z/ep/hbkat8+PHENuPR9v81mUyQvVX9jTALVIYioTdxkc8Ul
 y0p5UmgM/TsmnINGVUeFp5LkmfdyOhUhBtwovDhzDjR4RC1/otty1/9l4VHqw1ym
 ETwqu7pl7bb9aDNsOEV9Z21kOMuTDbApHIT6crptNBllUvR0jDYfD4xOAs3zQLO5
 JWOX2fPUHzFusINuA6fS
 =2irt
 -----END PGP SIGNATURE-----

Merge tag 'asoc-3.8' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-next

ASoC: Updates for v3.8

Very quiet release for ASoC really:

- Standardisation of the logging.
- DT and dmaengine support for Atmel.
- Support for Wolfson ADSP cores.
- New drivers for Freescale/iVeia P1022 and Maxim MAX98090.
This commit is contained in:
Takashi Iwai 2012-12-03 09:55:44 +01:00
commit eb10149d17
301 changed files with 7790 additions and 2766 deletions

View File

@ -1823,6 +1823,11 @@ S: Kattreinstr 38
S: D-64295 S: D-64295
S: Germany S: Germany
N: Avi Kivity
E: avi.kivity@gmail.com
D: Kernel-based Virtual Machine (KVM)
S: Ra'annana, Israel
N: Andi Kleen N: Andi Kleen
E: andi@firstfloor.org E: andi@firstfloor.org
U: http://www.halobates.de U: http://www.halobates.de

View File

@ -0,0 +1,15 @@
* Atmel SSC driver.
Required properties:
- compatible: "atmel,at91rm9200-ssc" or "atmel,at91sam9g45-ssc"
- atmel,at91rm9200-ssc: support pdc transfer
- atmel,at91sam9g45-ssc: support dma transfer
- reg: Should contain SSC registers location and length
- interrupts: Should contain SSC interrupt
Example:
ssc0: ssc@fffbc000 {
compatible = "atmel,at91rm9200-ssc";
reg = <0xfffbc000 0x4000>;
interrupts = <14 4 5>;
};

View File

@ -8,9 +8,16 @@ gpios property as described in section VIII.1 in the following order:
MDC, MDIO. MDC, MDIO.
Note: Each gpio-mdio bus should have an alias correctly numbered in "aliases"
node.
Example: Example:
mdio { aliases {
mdio-gpio0 = <&mdio0>;
};
mdio0: mdio {
compatible = "virtual,mdio-gpio"; compatible = "virtual,mdio-gpio";
#address-cells = <1>; #address-cells = <1>;
#size-cells = <0>; #size-cells = <0>;

View File

@ -0,0 +1,22 @@
AK4104 S/PDIF transmitter
This device supports SPI mode only.
Required properties:
- compatible : "asahi-kasei,ak4104"
- reg : The chip select number on the SPI bus
Optional properties:
- reset-gpio : a GPIO spec for the reset pin. If specified, it will be
deasserted before communication to the device starts.
Example:
spdif: ak4104@0 {
compatible = "asahi-kasei,ak4104";
reg = <0>;
spi-max-frequency = <5000000>;
};

View File

@ -0,0 +1,26 @@
* Atmel at91sam9g20ek wm8731 audio complex
Required properties:
- compatible: "atmel,at91sam9g20ek-wm8731-audio"
- atmel,model: The user-visible name of this sound complex.
- atmel,audio-routing: A list of the connections between audio components.
- atmel,ssc-controller: The phandle of the SSC controller
- atmel,audio-codec: The phandle of the WM8731 audio codec
Optional properties:
- pinctrl-names, pinctrl-0: Please refer to pinctrl-bindings.txt
Example:
sound {
compatible = "atmel,at91sam9g20ek-wm8731-audio";
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_pck0_as_mck>;
atmel,model = "wm8731 @ AT91SAMG20EK";
atmel,audio-routing =
"Ext Spk", "LHPOUT",
"Int MIC", "MICIN";
atmel,ssc-controller = <&ssc0>;
atmel,audio-codec = <&wm8731>;
};

View File

@ -18,6 +18,8 @@ Optional properties:
- reset-gpio: a GPIO spec to define which pin is connected to the chip's - reset-gpio: a GPIO spec to define which pin is connected to the chip's
!RESET pin !RESET pin
- cirrus,amuteb-eq-bmutec: When given, the Codec's AMUTEB=BMUTEC flag
is enabled.
Examples: Examples:

View File

@ -12,7 +12,7 @@ Required properties:
Optional properties: Optional properties:
- ti,dmic: phandle for the OMAP dmic node if the machine have it connected - ti,dmic: phandle for the OMAP dmic node if the machine have it connected
- ti,jack_detection: Need to be set to <1> if the board capable to detect jack - ti,jack_detection: Need to be present if the board capable to detect jack
insertion, removal. insertion, removal.
Available audio endpoints for the audio-routing table: Available audio endpoints for the audio-routing table:
@ -59,7 +59,7 @@ sound {
compatible = "ti,abe-twl6040"; compatible = "ti,abe-twl6040";
ti,model = "SDP4430"; ti,model = "SDP4430";
ti,jack-detection = <1>; ti,jack-detection;
ti,mclk-freq = <38400000>; ti,mclk-freq = <38400000>;
ti,mcpdm = <&mcpdm>; ti,mcpdm = <&mcpdm>;

View File

@ -32,7 +32,7 @@ no entry is in the forwarding table.
# ip link delete vxlan0 # ip link delete vxlan0
3. Show vxlan info 3. Show vxlan info
# ip -d show vxlan0 # ip -d link show vxlan0
It is possible to create, destroy and display the vxlan It is possible to create, destroy and display the vxlan
forwarding table using the new bridge command. forwarding table using the new bridge command.
@ -41,7 +41,7 @@ forwarding table using the new bridge command.
# bridge fdb add to 00:17:42:8a:b4:05 dst 192.19.0.2 dev vxlan0 # bridge fdb add to 00:17:42:8a:b4:05 dst 192.19.0.2 dev vxlan0
2. Delete forwarding table entry 2. Delete forwarding table entry
# bridge fdb delete 00:17:42:8a:b4:05 # bridge fdb delete 00:17:42:8a:b4:05 dev vxlan0
3. Show forwarding table 3. Show forwarding table
# bridge fdb show dev vxlan0 # bridge fdb show dev vxlan0

View File

@ -526,17 +526,17 @@ F: drivers/video/geode/
F: arch/x86/include/asm/geode.h F: arch/x86/include/asm/geode.h
AMD IOMMU (AMD-VI) AMD IOMMU (AMD-VI)
M: Joerg Roedel <joerg.roedel@amd.com> M: Joerg Roedel <joro@8bytes.org>
L: iommu@lists.linux-foundation.org L: iommu@lists.linux-foundation.org
T: git git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git T: git git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git
S: Supported S: Maintained
F: drivers/iommu/amd_iommu*.[ch] F: drivers/iommu/amd_iommu*.[ch]
F: include/linux/amd-iommu.h F: include/linux/amd-iommu.h
AMD MICROCODE UPDATE SUPPORT AMD MICROCODE UPDATE SUPPORT
M: Andreas Herrmann <andreas.herrmann3@amd.com> M: Andreas Herrmann <herrmann.der.user@googlemail.com>
L: amd64-microcode@amd64.org L: amd64-microcode@amd64.org
S: Supported S: Maintained
F: arch/x86/kernel/microcode_amd.c F: arch/x86/kernel/microcode_amd.c
AMS (Apple Motion Sensor) DRIVER AMS (Apple Motion Sensor) DRIVER
@ -841,6 +841,14 @@ T: git git://git.kernel.org/pub/scm/linux/kernel/git/kristoffer/linux-hpc.git
F: arch/arm/mach-sa1100/jornada720.c F: arch/arm/mach-sa1100/jornada720.c
F: arch/arm/mach-sa1100/include/mach/jornada720.h F: arch/arm/mach-sa1100/include/mach/jornada720.h
ARM/IGEP MACHINE SUPPORT
M: Enric Balletbo i Serra <eballetbo@gmail.com>
M: Javier Martinez Canillas <javier@dowhile0.org>
L: linux-omap@vger.kernel.org
L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
S: Maintained
F: arch/arm/mach-omap2/board-igep0020.c
ARM/INCOME PXA270 SUPPORT ARM/INCOME PXA270 SUPPORT
M: Marek Vasut <marek.vasut@gmail.com> M: Marek Vasut <marek.vasut@gmail.com>
L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
@ -2708,10 +2716,10 @@ F: include/linux/edac.h
EDAC-AMD64 EDAC-AMD64
M: Doug Thompson <dougthompson@xmission.com> M: Doug Thompson <dougthompson@xmission.com>
M: Borislav Petkov <borislav.petkov@amd.com> M: Borislav Petkov <bp@alien8.de>
L: linux-edac@vger.kernel.org L: linux-edac@vger.kernel.org
W: bluesmoke.sourceforge.net W: bluesmoke.sourceforge.net
S: Supported S: Maintained
F: drivers/edac/amd64_edac* F: drivers/edac/amd64_edac*
EDAC-E752X EDAC-E752X
@ -3753,7 +3761,7 @@ S: Maintained
F: drivers/platform/x86/ideapad-laptop.c F: drivers/platform/x86/ideapad-laptop.c
IDE/ATAPI DRIVERS IDE/ATAPI DRIVERS
M: Borislav Petkov <petkovbb@gmail.com> M: Borislav Petkov <bp@alien8.de>
L: linux-ide@vger.kernel.org L: linux-ide@vger.kernel.org
S: Maintained S: Maintained
F: Documentation/cdrom/ide-cd F: Documentation/cdrom/ide-cd
@ -4280,8 +4288,8 @@ F: include/linux/lockd/
F: include/linux/sunrpc/ F: include/linux/sunrpc/
KERNEL VIRTUAL MACHINE (KVM) KERNEL VIRTUAL MACHINE (KVM)
M: Avi Kivity <avi@redhat.com>
M: Marcelo Tosatti <mtosatti@redhat.com> M: Marcelo Tosatti <mtosatti@redhat.com>
M: Gleb Natapov <gleb@redhat.com>
L: kvm@vger.kernel.org L: kvm@vger.kernel.org
W: http://kvm.qumranet.com W: http://kvm.qumranet.com
S: Supported S: Supported
@ -5413,7 +5421,7 @@ S: Maintained
F: sound/drivers/opl4/ F: sound/drivers/opl4/
OPROFILE OPROFILE
M: Robert Richter <robert.richter@amd.com> M: Robert Richter <rric@kernel.org>
L: oprofile-list@lists.sf.net L: oprofile-list@lists.sf.net
S: Maintained S: Maintained
F: arch/*/include/asm/oprofile*.h F: arch/*/include/asm/oprofile*.h
@ -8198,7 +8206,7 @@ F: drivers/platform/x86
X86 MCE INFRASTRUCTURE X86 MCE INFRASTRUCTURE
M: Tony Luck <tony.luck@intel.com> M: Tony Luck <tony.luck@intel.com>
M: Borislav Petkov <bp@amd64.org> M: Borislav Petkov <bp@alien8.de>
L: linux-edac@vger.kernel.org L: linux-edac@vger.kernel.org
S: Maintained S: Maintained
F: arch/x86/kernel/cpu/mcheck/* F: arch/x86/kernel/cpu/mcheck/*

View File

@ -1,7 +1,7 @@
VERSION = 3 VERSION = 3
PATCHLEVEL = 7 PATCHLEVEL = 7
SUBLEVEL = 0 SUBLEVEL = 0
EXTRAVERSION = -rc6 EXTRAVERSION = -rc7
NAME = Terrified Chipmunk NAME = Terrified Chipmunk
# *DOCUMENTATION* # *DOCUMENTATION*

View File

@ -445,7 +445,7 @@ struct procfs_args {
* unhappy with OSF UFS. [CHECKME] * unhappy with OSF UFS. [CHECKME]
*/ */
static int static int
osf_ufs_mount(char *dirname, struct ufs_args __user *args, int flags) osf_ufs_mount(const char *dirname, struct ufs_args __user *args, int flags)
{ {
int retval; int retval;
struct cdfs_args tmp; struct cdfs_args tmp;
@ -465,7 +465,7 @@ osf_ufs_mount(char *dirname, struct ufs_args __user *args, int flags)
} }
static int static int
osf_cdfs_mount(char *dirname, struct cdfs_args __user *args, int flags) osf_cdfs_mount(const char *dirname, struct cdfs_args __user *args, int flags)
{ {
int retval; int retval;
struct cdfs_args tmp; struct cdfs_args tmp;
@ -485,7 +485,7 @@ osf_cdfs_mount(char *dirname, struct cdfs_args __user *args, int flags)
} }
static int static int
osf_procfs_mount(char *dirname, struct procfs_args __user *args, int flags) osf_procfs_mount(const char *dirname, struct procfs_args __user *args, int flags)
{ {
struct procfs_args tmp; struct procfs_args tmp;

View File

@ -29,6 +29,7 @@
tcb0 = &tcb0; tcb0 = &tcb0;
tcb1 = &tcb1; tcb1 = &tcb1;
i2c0 = &i2c0; i2c0 = &i2c0;
ssc0 = &ssc0;
}; };
cpus { cpus {
cpu@0 { cpu@0 {
@ -212,6 +213,13 @@
status = "disabled"; status = "disabled";
}; };
ssc0: ssc@fffbc000 {
compatible = "atmel,at91rm9200-ssc";
reg = <0xfffbc000 0x4000>;
interrupts = <14 4 5>;
status = "disable";
};
adc0: adc@fffe0000 { adc0: adc@fffe0000 {
compatible = "atmel,at91sam9260-adc"; compatible = "atmel,at91sam9260-adc";
reg = <0xfffe0000 0x100>; reg = <0xfffe0000 0x100>;

View File

@ -25,6 +25,8 @@
gpio4 = &pioE; gpio4 = &pioE;
tcb0 = &tcb0; tcb0 = &tcb0;
i2c0 = &i2c0; i2c0 = &i2c0;
ssc0 = &ssc0;
ssc1 = &ssc1;
}; };
cpus { cpus {
cpu@0 { cpu@0 {
@ -173,6 +175,20 @@
status = "disabled"; status = "disabled";
}; };
ssc0: ssc@fff98000 {
compatible = "atmel,at91rm9200-ssc";
reg = <0xfff98000 0x4000>;
interrupts = <16 4 5>;
status = "disable";
};
ssc1: ssc@fff9c000 {
compatible = "atmel,at91rm9200-ssc";
reg = <0xfff9c000 0x4000>;
interrupts = <17 4 5>;
status = "disable";
};
macb0: ethernet@fffbc000 { macb0: ethernet@fffbc000 {
compatible = "cdns,at32ap7000-macb", "cdns,macb"; compatible = "cdns,at32ap7000-macb", "cdns,macb";
reg = <0xfffbc000 0x100>; reg = <0xfffbc000 0x100>;

View File

@ -30,6 +30,16 @@
ahb { ahb {
apb { apb {
pinctrl@fffff400 {
board {
pinctrl_pck0_as_mck: pck0_as_mck {
atmel,pins =
<2 1 0x2 0x0>; /* PC1 periph B */
};
};
};
dbgu: serial@fffff200 { dbgu: serial@fffff200 {
status = "okay"; status = "okay";
}; };
@ -51,6 +61,11 @@
atmel,vbus-gpio = <&pioC 5 0>; atmel,vbus-gpio = <&pioC 5 0>;
status = "okay"; status = "okay";
}; };
ssc0: ssc@fffbc000 {
status = "okay";
pinctrl-0 = <&pinctrl_ssc0_tx>;
};
}; };
nand0: nand@40000000 { nand0: nand@40000000 {
@ -114,7 +129,7 @@
reg = <0x50>; reg = <0x50>;
}; };
wm8731@1b { wm8731: wm8731@1b {
compatible = "wm8731"; compatible = "wm8731";
reg = <0x1b>; reg = <0x1b>;
}; };
@ -139,4 +154,19 @@
gpio-key,wakeup; gpio-key,wakeup;
}; };
}; };
sound {
compatible = "atmel,at91sam9g20ek-wm8731-audio";
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_pck0_as_mck>;
atmel,model = "wm8731 @ AT91SAMG20EK";
atmel,audio-routing =
"Ext Spk", "LHPOUT",
"Int Mic", "MICIN";
atmel,ssc-controller = <&ssc0>;
atmel,audio-codec = <&wm8731>;
};
}; };

View File

@ -31,6 +31,8 @@
tcb1 = &tcb1; tcb1 = &tcb1;
i2c0 = &i2c0; i2c0 = &i2c0;
i2c1 = &i2c1; i2c1 = &i2c1;
ssc0 = &ssc0;
ssc1 = &ssc1;
}; };
cpus { cpus {
cpu@0 { cpu@0 {
@ -226,6 +228,20 @@
status = "disabled"; status = "disabled";
}; };
ssc0: ssc@fff9c000 {
compatible = "atmel,at91sam9g45-ssc";
reg = <0xfff9c000 0x4000>;
interrupts = <16 4 5>;
status = "disable";
};
ssc1: ssc@fffa0000 {
compatible = "atmel,at91sam9g45-ssc";
reg = <0xfffa0000 0x4000>;
interrupts = <17 4 5>;
status = "disable";
};
adc0: adc@fffb0000 { adc0: adc@fffb0000 {
compatible = "atmel,at91sam9260-adc"; compatible = "atmel,at91sam9260-adc";
reg = <0xfffb0000 0x100>; reg = <0xfffb0000 0x100>;

View File

@ -30,6 +30,7 @@
i2c0 = &i2c0; i2c0 = &i2c0;
i2c1 = &i2c1; i2c1 = &i2c1;
i2c2 = &i2c2; i2c2 = &i2c2;
ssc0 = &ssc0;
}; };
cpus { cpus {
cpu@0 { cpu@0 {
@ -87,6 +88,13 @@
interrupts = <1 4 7>; interrupts = <1 4 7>;
}; };
ssc0: ssc@f0010000 {
compatible = "atmel,at91sam9g45-ssc";
reg = <0xf0010000 0x4000>;
interrupts = <28 4 5>;
status = "disable";
};
tcb0: timer@f8008000 { tcb0: timer@f8008000 {
compatible = "atmel,at91sam9x5-tcb"; compatible = "atmel,at91sam9x5-tcb";
reg = <0xf8008000 0x100>; reg = <0xf8008000 0x100>;

View File

@ -184,9 +184,12 @@ static struct clk_lookup periph_clocks_lookups[] = {
CLKDEV_CON_DEV_ID("t0_clk", "atmel_tcb.1", &tc3_clk), CLKDEV_CON_DEV_ID("t0_clk", "atmel_tcb.1", &tc3_clk),
CLKDEV_CON_DEV_ID("t1_clk", "atmel_tcb.1", &tc4_clk), CLKDEV_CON_DEV_ID("t1_clk", "atmel_tcb.1", &tc4_clk),
CLKDEV_CON_DEV_ID("t2_clk", "atmel_tcb.1", &tc5_clk), CLKDEV_CON_DEV_ID("t2_clk", "atmel_tcb.1", &tc5_clk),
CLKDEV_CON_DEV_ID("pclk", "ssc.0", &ssc0_clk), CLKDEV_CON_DEV_ID("pclk", "at91rm9200_ssc.0", &ssc0_clk),
CLKDEV_CON_DEV_ID("pclk", "ssc.1", &ssc1_clk), CLKDEV_CON_DEV_ID("pclk", "at91rm9200_ssc.1", &ssc1_clk),
CLKDEV_CON_DEV_ID("pclk", "ssc.2", &ssc2_clk), CLKDEV_CON_DEV_ID("pclk", "at91rm9200_ssc.2", &ssc2_clk),
CLKDEV_CON_DEV_ID("pclk", "fffd0000.ssc", &ssc0_clk),
CLKDEV_CON_DEV_ID("pclk", "fffd4000.ssc", &ssc1_clk),
CLKDEV_CON_DEV_ID("pclk", "fffd8000.ssc", &ssc2_clk),
CLKDEV_CON_DEV_ID(NULL, "i2c-at91rm9200.0", &twi_clk), CLKDEV_CON_DEV_ID(NULL, "i2c-at91rm9200.0", &twi_clk),
/* fake hclk clock */ /* fake hclk clock */
CLKDEV_CON_DEV_ID("hclk", "at91_ohci", &ohci_clk), CLKDEV_CON_DEV_ID("hclk", "at91_ohci", &ohci_clk),

View File

@ -752,7 +752,7 @@ static struct resource ssc0_resources[] = {
}; };
static struct platform_device at91rm9200_ssc0_device = { static struct platform_device at91rm9200_ssc0_device = {
.name = "ssc", .name = "at91rm9200_ssc",
.id = 0, .id = 0,
.dev = { .dev = {
.dma_mask = &ssc0_dmamask, .dma_mask = &ssc0_dmamask,
@ -794,7 +794,7 @@ static struct resource ssc1_resources[] = {
}; };
static struct platform_device at91rm9200_ssc1_device = { static struct platform_device at91rm9200_ssc1_device = {
.name = "ssc", .name = "at91rm9200_ssc",
.id = 1, .id = 1,
.dev = { .dev = {
.dma_mask = &ssc1_dmamask, .dma_mask = &ssc1_dmamask,
@ -836,7 +836,7 @@ static struct resource ssc2_resources[] = {
}; };
static struct platform_device at91rm9200_ssc2_device = { static struct platform_device at91rm9200_ssc2_device = {
.name = "ssc", .name = "at91rm9200_ssc",
.id = 2, .id = 2,
.dev = { .dev = {
.dma_mask = &ssc2_dmamask, .dma_mask = &ssc2_dmamask,

View File

@ -210,7 +210,8 @@ static struct clk_lookup periph_clocks_lookups[] = {
CLKDEV_CON_DEV_ID("t0_clk", "atmel_tcb.1", &tc3_clk), CLKDEV_CON_DEV_ID("t0_clk", "atmel_tcb.1", &tc3_clk),
CLKDEV_CON_DEV_ID("t1_clk", "atmel_tcb.1", &tc4_clk), CLKDEV_CON_DEV_ID("t1_clk", "atmel_tcb.1", &tc4_clk),
CLKDEV_CON_DEV_ID("t2_clk", "atmel_tcb.1", &tc5_clk), CLKDEV_CON_DEV_ID("t2_clk", "atmel_tcb.1", &tc5_clk),
CLKDEV_CON_DEV_ID("pclk", "ssc.0", &ssc_clk), CLKDEV_CON_DEV_ID("pclk", "at91rm9200_ssc.0", &ssc_clk),
CLKDEV_CON_DEV_ID("pclk", "fffbc000.ssc", &ssc_clk),
CLKDEV_CON_DEV_ID(NULL, "i2c-at91sam9260.0", &twi_clk), CLKDEV_CON_DEV_ID(NULL, "i2c-at91sam9260.0", &twi_clk),
CLKDEV_CON_DEV_ID(NULL, "i2c-at91sam9g20.0", &twi_clk), CLKDEV_CON_DEV_ID(NULL, "i2c-at91sam9g20.0", &twi_clk),
/* more usart lookup table for DT entries */ /* more usart lookup table for DT entries */

View File

@ -742,7 +742,7 @@ static struct resource ssc_resources[] = {
}; };
static struct platform_device at91sam9260_ssc_device = { static struct platform_device at91sam9260_ssc_device = {
.name = "ssc", .name = "at91rm9200_ssc",
.id = 0, .id = 0,
.dev = { .dev = {
.dma_mask = &ssc_dmamask, .dma_mask = &ssc_dmamask,

View File

@ -174,9 +174,12 @@ static struct clk_lookup periph_clocks_lookups[] = {
CLKDEV_CON_DEV_ID("t0_clk", "atmel_tcb.0", &tc0_clk), CLKDEV_CON_DEV_ID("t0_clk", "atmel_tcb.0", &tc0_clk),
CLKDEV_CON_DEV_ID("t1_clk", "atmel_tcb.0", &tc1_clk), CLKDEV_CON_DEV_ID("t1_clk", "atmel_tcb.0", &tc1_clk),
CLKDEV_CON_DEV_ID("t2_clk", "atmel_tcb.0", &tc2_clk), CLKDEV_CON_DEV_ID("t2_clk", "atmel_tcb.0", &tc2_clk),
CLKDEV_CON_DEV_ID("pclk", "ssc.0", &ssc0_clk), CLKDEV_CON_DEV_ID("pclk", "at91rm9200_ssc.0", &ssc0_clk),
CLKDEV_CON_DEV_ID("pclk", "ssc.1", &ssc1_clk), CLKDEV_CON_DEV_ID("pclk", "at91rm9200_ssc.1", &ssc1_clk),
CLKDEV_CON_DEV_ID("pclk", "ssc.2", &ssc2_clk), CLKDEV_CON_DEV_ID("pclk", "at91rm9200_ssc.2", &ssc2_clk),
CLKDEV_CON_DEV_ID("pclk", "fffbc000.ssc", &ssc0_clk),
CLKDEV_CON_DEV_ID("pclk", "fffc0000.ssc", &ssc1_clk),
CLKDEV_CON_DEV_ID("pclk", "fffc4000.ssc", &ssc2_clk),
CLKDEV_CON_DEV_ID("hclk", "at91_ohci", &hck0), CLKDEV_CON_DEV_ID("hclk", "at91_ohci", &hck0),
CLKDEV_CON_DEV_ID(NULL, "i2c-at91sam9261.0", &twi_clk), CLKDEV_CON_DEV_ID(NULL, "i2c-at91sam9261.0", &twi_clk),
CLKDEV_CON_DEV_ID(NULL, "i2c-at91sam9g10.0", &twi_clk), CLKDEV_CON_DEV_ID(NULL, "i2c-at91sam9g10.0", &twi_clk),

View File

@ -706,7 +706,7 @@ static struct resource ssc0_resources[] = {
}; };
static struct platform_device at91sam9261_ssc0_device = { static struct platform_device at91sam9261_ssc0_device = {
.name = "ssc", .name = "at91rm9200_ssc",
.id = 0, .id = 0,
.dev = { .dev = {
.dma_mask = &ssc0_dmamask, .dma_mask = &ssc0_dmamask,
@ -748,7 +748,7 @@ static struct resource ssc1_resources[] = {
}; };
static struct platform_device at91sam9261_ssc1_device = { static struct platform_device at91sam9261_ssc1_device = {
.name = "ssc", .name = "at91rm9200_ssc",
.id = 1, .id = 1,
.dev = { .dev = {
.dma_mask = &ssc1_dmamask, .dma_mask = &ssc1_dmamask,
@ -790,7 +790,7 @@ static struct resource ssc2_resources[] = {
}; };
static struct platform_device at91sam9261_ssc2_device = { static struct platform_device at91sam9261_ssc2_device = {
.name = "ssc", .name = "at91rm9200_ssc",
.id = 2, .id = 2,
.dev = { .dev = {
.dma_mask = &ssc2_dmamask, .dma_mask = &ssc2_dmamask,

View File

@ -186,8 +186,10 @@ static struct clk *periph_clocks[] __initdata = {
static struct clk_lookup periph_clocks_lookups[] = { static struct clk_lookup periph_clocks_lookups[] = {
/* One additional fake clock for macb_hclk */ /* One additional fake clock for macb_hclk */
CLKDEV_CON_ID("hclk", &macb_clk), CLKDEV_CON_ID("hclk", &macb_clk),
CLKDEV_CON_DEV_ID("pclk", "ssc.0", &ssc0_clk), CLKDEV_CON_DEV_ID("pclk", "at91rm9200_ssc.0", &ssc0_clk),
CLKDEV_CON_DEV_ID("pclk", "ssc.1", &ssc1_clk), CLKDEV_CON_DEV_ID("pclk", "at91rm9200_ssc.1", &ssc1_clk),
CLKDEV_CON_DEV_ID("pclk", "fff98000.ssc", &ssc0_clk),
CLKDEV_CON_DEV_ID("pclk", "fff9c000.ssc", &ssc1_clk),
CLKDEV_CON_DEV_ID("mci_clk", "atmel_mci.0", &mmc0_clk), CLKDEV_CON_DEV_ID("mci_clk", "atmel_mci.0", &mmc0_clk),
CLKDEV_CON_DEV_ID("mci_clk", "atmel_mci.1", &mmc1_clk), CLKDEV_CON_DEV_ID("mci_clk", "atmel_mci.1", &mmc1_clk),
CLKDEV_CON_DEV_ID("spi_clk", "atmel_spi.0", &spi0_clk), CLKDEV_CON_DEV_ID("spi_clk", "atmel_spi.0", &spi0_clk),

View File

@ -1199,7 +1199,7 @@ static struct resource ssc0_resources[] = {
}; };
static struct platform_device at91sam9263_ssc0_device = { static struct platform_device at91sam9263_ssc0_device = {
.name = "ssc", .name = "at91rm9200_ssc",
.id = 0, .id = 0,
.dev = { .dev = {
.dma_mask = &ssc0_dmamask, .dma_mask = &ssc0_dmamask,
@ -1241,7 +1241,7 @@ static struct resource ssc1_resources[] = {
}; };
static struct platform_device at91sam9263_ssc1_device = { static struct platform_device at91sam9263_ssc1_device = {
.name = "ssc", .name = "at91rm9200_ssc",
.id = 1, .id = 1,
.dev = { .dev = {
.dma_mask = &ssc1_dmamask, .dma_mask = &ssc1_dmamask,

View File

@ -239,8 +239,10 @@ static struct clk_lookup periph_clocks_lookups[] = {
CLKDEV_CON_DEV_ID("t0_clk", "atmel_tcb.1", &tcb0_clk), CLKDEV_CON_DEV_ID("t0_clk", "atmel_tcb.1", &tcb0_clk),
CLKDEV_CON_DEV_ID(NULL, "i2c-at91sam9g10.0", &twi0_clk), CLKDEV_CON_DEV_ID(NULL, "i2c-at91sam9g10.0", &twi0_clk),
CLKDEV_CON_DEV_ID(NULL, "i2c-at91sam9g10.1", &twi1_clk), CLKDEV_CON_DEV_ID(NULL, "i2c-at91sam9g10.1", &twi1_clk),
CLKDEV_CON_DEV_ID("pclk", "ssc.0", &ssc0_clk), CLKDEV_CON_DEV_ID("pclk", "at91sam9g45_ssc.0", &ssc0_clk),
CLKDEV_CON_DEV_ID("pclk", "ssc.1", &ssc1_clk), CLKDEV_CON_DEV_ID("pclk", "at91sam9g45_ssc.1", &ssc1_clk),
CLKDEV_CON_DEV_ID("pclk", "fff9c000.ssc", &ssc0_clk),
CLKDEV_CON_DEV_ID("pclk", "fffa0000.ssc", &ssc1_clk),
CLKDEV_CON_DEV_ID(NULL, "atmel-trng", &trng_clk), CLKDEV_CON_DEV_ID(NULL, "atmel-trng", &trng_clk),
CLKDEV_CON_DEV_ID(NULL, "atmel_sha", &aestdessha_clk), CLKDEV_CON_DEV_ID(NULL, "atmel_sha", &aestdessha_clk),
CLKDEV_CON_DEV_ID(NULL, "atmel_tdes", &aestdessha_clk), CLKDEV_CON_DEV_ID(NULL, "atmel_tdes", &aestdessha_clk),

View File

@ -1459,7 +1459,7 @@ static struct resource ssc0_resources[] = {
}; };
static struct platform_device at91sam9g45_ssc0_device = { static struct platform_device at91sam9g45_ssc0_device = {
.name = "ssc", .name = "at91sam9g45_ssc",
.id = 0, .id = 0,
.dev = { .dev = {
.dma_mask = &ssc0_dmamask, .dma_mask = &ssc0_dmamask,
@ -1501,7 +1501,7 @@ static struct resource ssc1_resources[] = {
}; };
static struct platform_device at91sam9g45_ssc1_device = { static struct platform_device at91sam9g45_ssc1_device = {
.name = "ssc", .name = "at91sam9g45_ssc",
.id = 1, .id = 1,
.dev = { .dev = {
.dma_mask = &ssc1_dmamask, .dma_mask = &ssc1_dmamask,

View File

@ -184,8 +184,10 @@ static struct clk_lookup periph_clocks_lookups[] = {
CLKDEV_CON_DEV_ID("t0_clk", "atmel_tcb.0", &tc0_clk), CLKDEV_CON_DEV_ID("t0_clk", "atmel_tcb.0", &tc0_clk),
CLKDEV_CON_DEV_ID("t1_clk", "atmel_tcb.0", &tc1_clk), CLKDEV_CON_DEV_ID("t1_clk", "atmel_tcb.0", &tc1_clk),
CLKDEV_CON_DEV_ID("t2_clk", "atmel_tcb.0", &tc2_clk), CLKDEV_CON_DEV_ID("t2_clk", "atmel_tcb.0", &tc2_clk),
CLKDEV_CON_DEV_ID("pclk", "ssc.0", &ssc0_clk), CLKDEV_CON_DEV_ID("pclk", "at91rm9200_ssc.0", &ssc0_clk),
CLKDEV_CON_DEV_ID("pclk", "ssc.1", &ssc1_clk), CLKDEV_CON_DEV_ID("pclk", "at91rm9200_ssc.1", &ssc1_clk),
CLKDEV_CON_DEV_ID("pclk", "fffc0000.ssc", &ssc0_clk),
CLKDEV_CON_DEV_ID("pclk", "fffc4000.ssc", &ssc1_clk),
CLKDEV_CON_DEV_ID(NULL, "i2c-at91sam9g20.0", &twi0_clk), CLKDEV_CON_DEV_ID(NULL, "i2c-at91sam9g20.0", &twi0_clk),
CLKDEV_CON_DEV_ID(NULL, "i2c-at91sam9g20.1", &twi1_clk), CLKDEV_CON_DEV_ID(NULL, "i2c-at91sam9g20.1", &twi1_clk),
CLKDEV_CON_ID("pioA", &pioA_clk), CLKDEV_CON_ID("pioA", &pioA_clk),

View File

@ -832,7 +832,7 @@ static struct resource ssc0_resources[] = {
}; };
static struct platform_device at91sam9rl_ssc0_device = { static struct platform_device at91sam9rl_ssc0_device = {
.name = "ssc", .name = "at91rm9200_ssc",
.id = 0, .id = 0,
.dev = { .dev = {
.dma_mask = &ssc0_dmamask, .dma_mask = &ssc0_dmamask,
@ -874,7 +874,7 @@ static struct resource ssc1_resources[] = {
}; };
static struct platform_device at91sam9rl_ssc1_device = { static struct platform_device at91sam9rl_ssc1_device = {
.name = "ssc", .name = "at91rm9200_ssc",
.id = 1, .id = 1,
.dev = { .dev = {
.dma_mask = &ssc1_dmamask, .dma_mask = &ssc1_dmamask,

View File

@ -231,6 +231,7 @@ static struct clk_lookup periph_clocks_lookups[] = {
CLKDEV_CON_DEV_ID("t0_clk", "f800c000.timer", &tcb0_clk), CLKDEV_CON_DEV_ID("t0_clk", "f800c000.timer", &tcb0_clk),
CLKDEV_CON_DEV_ID("dma_clk", "ffffec00.dma-controller", &dma0_clk), CLKDEV_CON_DEV_ID("dma_clk", "ffffec00.dma-controller", &dma0_clk),
CLKDEV_CON_DEV_ID("dma_clk", "ffffee00.dma-controller", &dma1_clk), CLKDEV_CON_DEV_ID("dma_clk", "ffffee00.dma-controller", &dma1_clk),
CLKDEV_CON_DEV_ID("pclk", "f0010000.ssc", &ssc_clk),
CLKDEV_CON_DEV_ID(NULL, "f8010000.i2c", &twi0_clk), CLKDEV_CON_DEV_ID(NULL, "f8010000.i2c", &twi0_clk),
CLKDEV_CON_DEV_ID(NULL, "f8014000.i2c", &twi1_clk), CLKDEV_CON_DEV_ID(NULL, "f8014000.i2c", &twi1_clk),
CLKDEV_CON_DEV_ID(NULL, "f8018000.i2c", &twi2_clk), CLKDEV_CON_DEV_ID(NULL, "f8018000.i2c", &twi2_clk),

View File

@ -353,6 +353,16 @@ static struct i2c_board_info __initdata ek_i2c_devices[] = {
}, },
}; };
static struct platform_device sam9g20ek_audio_device = {
.name = "at91sam9g20ek-audio",
.id = -1,
};
static void __init ek_add_device_audio(void)
{
platform_device_register(&sam9g20ek_audio_device);
}
static void __init ek_board_init(void) static void __init ek_board_init(void)
{ {
@ -394,6 +404,7 @@ static void __init ek_board_init(void)
at91_set_B_periph(AT91_PIN_PC1, 0); at91_set_B_periph(AT91_PIN_PC1, 0);
/* SSC (for WM8731) */ /* SSC (for WM8731) */
at91_add_device_ssc(AT91SAM9260_ID_SSC, ATMEL_SSC_TX); at91_add_device_ssc(AT91SAM9260_ID_SSC, ATMEL_SSC_TX);
ek_add_device_audio();
} }
MACHINE_START(AT91SAM9G20EK, "Atmel AT91SAM9G20-EK") MACHINE_START(AT91SAM9G20EK, "Atmel AT91SAM9G20-EK")

View File

@ -762,16 +762,19 @@ static u8 da850_iis_serializer_direction[] = {
}; };
static struct snd_platform_data da850_evm_snd_data = { static struct snd_platform_data da850_evm_snd_data = {
.tx_dma_offset = 0x2000, .tx_dma_offset = 0x2000,
.rx_dma_offset = 0x2000, .rx_dma_offset = 0x2000,
.op_mode = DAVINCI_MCASP_IIS_MODE, .op_mode = DAVINCI_MCASP_IIS_MODE,
.num_serializer = ARRAY_SIZE(da850_iis_serializer_direction), .num_serializer = ARRAY_SIZE(da850_iis_serializer_direction),
.tdm_slots = 2, .tdm_slots = 2,
.serial_dir = da850_iis_serializer_direction, .serial_dir = da850_iis_serializer_direction,
.asp_chan_q = EVENTQ_0, .asp_chan_q = EVENTQ_0,
.version = MCASP_VERSION_2, .ram_chan_q = EVENTQ_1,
.txnumevt = 1, .version = MCASP_VERSION_2,
.rxnumevt = 1, .txnumevt = 1,
.rxnumevt = 1,
.sram_size_playback = SZ_8K,
.sram_size_capture = SZ_8K,
}; };
static const short da850_evm_mcasp_pins[] __initconst = { static const short da850_evm_mcasp_pins[] __initconst = {
@ -1509,6 +1512,7 @@ static __init void da850_evm_init(void)
pr_warning("da850_evm_init: mcasp mux setup failed: %d\n", pr_warning("da850_evm_init: mcasp mux setup failed: %d\n",
ret); ret);
da850_evm_snd_data.sram_pool = sram_get_gen_pool();
da8xx_register_mcasp(0, &da850_evm_snd_data); da8xx_register_mcasp(0, &da850_evm_snd_data);
ret = davinci_cfg_reg_list(da850_lcdcntl_pins); ret = davinci_cfg_reg_list(da850_lcdcntl_pins);

View File

@ -713,8 +713,7 @@ static int dm644x_venc_setup_clock(enum vpbe_enc_timings_type type,
break; break;
case VPBE_ENC_CUSTOM_TIMINGS: case VPBE_ENC_CUSTOM_TIMINGS:
if (pclock <= 27000000) { if (pclock <= 27000000) {
v |= DM644X_VPSS_MUXSEL_PLL2_MODE | v |= DM644X_VPSS_DACCLKEN;
DM644X_VPSS_DACCLKEN;
writel(v, DAVINCI_SYSMOD_VIRT(SYSMOD_VPSS_CLKCTL)); writel(v, DAVINCI_SYSMOD_VIRT(SYSMOD_VPSS_CLKCTL));
} else { } else {
/* /*

View File

@ -275,6 +275,9 @@ static int __init exynos_dma_init(void)
exynos_pdma1_pdata.nr_valid_peri = exynos_pdma1_pdata.nr_valid_peri =
ARRAY_SIZE(exynos4210_pdma1_peri); ARRAY_SIZE(exynos4210_pdma1_peri);
exynos_pdma1_pdata.peri_id = exynos4210_pdma1_peri; exynos_pdma1_pdata.peri_id = exynos4210_pdma1_peri;
if (samsung_rev() == EXYNOS4210_REV_0)
exynos_mdma1_device.res.start = EXYNOS4_PA_S_MDMA1;
} else if (soc_is_exynos4212() || soc_is_exynos4412()) { } else if (soc_is_exynos4212() || soc_is_exynos4412()) {
exynos_pdma0_pdata.nr_valid_peri = exynos_pdma0_pdata.nr_valid_peri =
ARRAY_SIZE(exynos4212_pdma0_peri); ARRAY_SIZE(exynos4212_pdma0_peri);

View File

@ -90,6 +90,7 @@
#define EXYNOS4_PA_MDMA0 0x10810000 #define EXYNOS4_PA_MDMA0 0x10810000
#define EXYNOS4_PA_MDMA1 0x12850000 #define EXYNOS4_PA_MDMA1 0x12850000
#define EXYNOS4_PA_S_MDMA1 0x12840000
#define EXYNOS4_PA_PDMA0 0x12680000 #define EXYNOS4_PA_PDMA0 0x12680000
#define EXYNOS4_PA_PDMA1 0x12690000 #define EXYNOS4_PA_PDMA1 0x12690000
#define EXYNOS5_PA_MDMA0 0x10800000 #define EXYNOS5_PA_MDMA0 0x10800000

View File

@ -580,6 +580,11 @@ static void __init igep_wlan_bt_init(void)
} else } else
return; return;
/* Make sure that the GPIO pins are muxed correctly */
omap_mux_init_gpio(igep_wlan_bt_gpios[0].gpio, OMAP_PIN_OUTPUT);
omap_mux_init_gpio(igep_wlan_bt_gpios[1].gpio, OMAP_PIN_OUTPUT);
omap_mux_init_gpio(igep_wlan_bt_gpios[2].gpio, OMAP_PIN_OUTPUT);
err = gpio_request_array(igep_wlan_bt_gpios, err = gpio_request_array(igep_wlan_bt_gpios,
ARRAY_SIZE(igep_wlan_bt_gpios)); ARRAY_SIZE(igep_wlan_bt_gpios));
if (err) { if (err) {

View File

@ -64,30 +64,36 @@ void __init omap_ads7846_init(int bus_num, int gpio_pendown, int gpio_debounce,
struct spi_board_info *spi_bi = &ads7846_spi_board_info; struct spi_board_info *spi_bi = &ads7846_spi_board_info;
int err; int err;
err = gpio_request_one(gpio_pendown, GPIOF_IN, "TSPenDown"); /*
if (err) { * If a board defines get_pendown_state() function, request the pendown
pr_err("Couldn't obtain gpio for TSPenDown: %d\n", err); * GPIO and set the GPIO debounce time.
return; * If a board does not define the get_pendown_state() function, then
} * the ads7846 driver will setup the pendown GPIO itself.
*/
if (board_pdata && board_pdata->get_pendown_state) {
err = gpio_request_one(gpio_pendown, GPIOF_IN, "TSPenDown");
if (err) {
pr_err("Couldn't obtain gpio for TSPenDown: %d\n", err);
return;
}
if (gpio_debounce) if (gpio_debounce)
gpio_set_debounce(gpio_pendown, gpio_debounce); gpio_set_debounce(gpio_pendown, gpio_debounce);
gpio_export(gpio_pendown, 0);
}
spi_bi->bus_num = bus_num; spi_bi->bus_num = bus_num;
spi_bi->irq = gpio_to_irq(gpio_pendown); spi_bi->irq = gpio_to_irq(gpio_pendown);
ads7846_config.gpio_pendown = gpio_pendown;
if (board_pdata) { if (board_pdata) {
board_pdata->gpio_pendown = gpio_pendown; board_pdata->gpio_pendown = gpio_pendown;
board_pdata->gpio_pendown_debounce = gpio_debounce;
spi_bi->platform_data = board_pdata; spi_bi->platform_data = board_pdata;
if (board_pdata->get_pendown_state)
gpio_export(gpio_pendown, 0);
} else {
ads7846_config.gpio_pendown = gpio_pendown;
} }
if (!board_pdata || (board_pdata && !board_pdata->get_pendown_state))
gpio_free(gpio_pendown);
spi_register_board_info(&ads7846_spi_board_info, 1); spi_register_board_info(&ads7846_spi_board_info, 1);
} }
#else #else

View File

@ -73,6 +73,7 @@ void __init omap4_pmic_init(const char *pmic_type,
{ {
/* PMIC part*/ /* PMIC part*/
omap_mux_init_signal("sys_nirq1", OMAP_PIN_INPUT_PULLUP | OMAP_PIN_OFF_WAKEUPENABLE); omap_mux_init_signal("sys_nirq1", OMAP_PIN_INPUT_PULLUP | OMAP_PIN_OFF_WAKEUPENABLE);
omap_mux_init_signal("fref_clk0_out.sys_drm_msecure", OMAP_PIN_OUTPUT);
omap_pmic_init(1, 400, pmic_type, 7 + OMAP44XX_IRQ_GIC_START, pmic_data); omap_pmic_init(1, 400, pmic_type, 7 + OMAP44XX_IRQ_GIC_START, pmic_data);
/* Register additional devices on i2c1 bus if needed */ /* Register additional devices on i2c1 bus if needed */

View File

@ -26,12 +26,14 @@
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/i2c.h> #include <linux/i2c.h>
#include <linux/i2c-omap.h>
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/err.h> #include <linux/err.h>
#include <linux/clk.h> #include <linux/clk.h>
#include <mach/irqs.h> #include <mach/irqs.h>
#include <plat/i2c.h> #include <plat/i2c.h>
#include <plat/omap-pm.h>
#include <plat/omap_device.h> #include <plat/omap_device.h>
#define OMAP_I2C_SIZE 0x3f #define OMAP_I2C_SIZE 0x3f
@ -127,6 +129,16 @@ static inline int omap1_i2c_add_bus(int bus_id)
#ifdef CONFIG_ARCH_OMAP2PLUS #ifdef CONFIG_ARCH_OMAP2PLUS
/*
* XXX This function is a temporary compatibility wrapper - only
* needed until the I2C driver can be converted to call
* omap_pm_set_max_dev_wakeup_lat() and handle a return code.
*/
static void omap_pm_set_max_mpu_wakeup_lat_compat(struct device *dev, long t)
{
omap_pm_set_max_mpu_wakeup_lat(dev, t);
}
static inline int omap2_i2c_add_bus(int bus_id) static inline int omap2_i2c_add_bus(int bus_id)
{ {
int l; int l;
@ -158,6 +170,15 @@ static inline int omap2_i2c_add_bus(int bus_id)
dev_attr = (struct omap_i2c_dev_attr *)oh->dev_attr; dev_attr = (struct omap_i2c_dev_attr *)oh->dev_attr;
pdata->flags = dev_attr->flags; pdata->flags = dev_attr->flags;
/*
* When waiting for completion of a i2c transfer, we need to
* set a wake up latency constraint for the MPU. This is to
* ensure quick enough wakeup from idle, when transfer
* completes.
* Only omap3 has support for constraints
*/
if (cpu_is_omap34xx())
pdata->set_mpu_wkup_lat = omap_pm_set_max_mpu_wakeup_lat_compat;
pdev = omap_device_build(name, bus_id, oh, pdata, pdev = omap_device_build(name, bus_id, oh, pdata,
sizeof(struct omap_i2c_bus_platform_data), sizeof(struct omap_i2c_bus_platform_data),
NULL, 0, 0); NULL, 0, 0);

View File

@ -41,7 +41,7 @@ struct k_sigaction {
static inline void sigaddset(sigset_t *set, int _sig) static inline void sigaddset(sigset_t *set, int _sig)
{ {
asm ("bfset %0{%1,#1}" asm ("bfset %0{%1,#1}"
: "+od" (*set) : "+o" (*set)
: "id" ((_sig - 1) ^ 31) : "id" ((_sig - 1) ^ 31)
: "cc"); : "cc");
} }
@ -49,7 +49,7 @@ static inline void sigaddset(sigset_t *set, int _sig)
static inline void sigdelset(sigset_t *set, int _sig) static inline void sigdelset(sigset_t *set, int _sig)
{ {
asm ("bfclr %0{%1,#1}" asm ("bfclr %0{%1,#1}"
: "+od" (*set) : "+o" (*set)
: "id" ((_sig - 1) ^ 31) : "id" ((_sig - 1) ^ 31)
: "cc"); : "cc");
} }
@ -65,7 +65,7 @@ static inline int __gen_sigismember(sigset_t *set, int _sig)
int ret; int ret;
asm ("bfextu %1{%2,#1},%0" asm ("bfextu %1{%2,#1},%0"
: "=d" (ret) : "=d" (ret)
: "od" (*set), "id" ((_sig-1) ^ 31) : "o" (*set), "id" ((_sig-1) ^ 31)
: "cc"); : "cc");
return ret; return ret;
} }

View File

@ -79,7 +79,7 @@ static struct resource data_resource = { .name = "Kernel data", };
void __init add_memory_region(phys_t start, phys_t size, long type) void __init add_memory_region(phys_t start, phys_t size, long type)
{ {
int x = boot_mem_map.nr_map; int x = boot_mem_map.nr_map;
struct boot_mem_map_entry *prev = boot_mem_map.map + x - 1; int i;
/* Sanity check */ /* Sanity check */
if (start + size < start) { if (start + size < start) {
@ -88,15 +88,29 @@ void __init add_memory_region(phys_t start, phys_t size, long type)
} }
/* /*
* Try to merge with previous entry if any. This is far less than * Try to merge with existing entry, if any.
* perfect but is sufficient for most real world cases.
*/ */
if (x && prev->addr + prev->size == start && prev->type == type) { for (i = 0; i < boot_mem_map.nr_map; i++) {
prev->size += size; struct boot_mem_map_entry *entry = boot_mem_map.map + i;
unsigned long top;
if (entry->type != type)
continue;
if (start + size < entry->addr)
continue; /* no overlap */
if (entry->addr + entry->size < start)
continue; /* no overlap */
top = max(entry->addr + entry->size, start + size);
entry->addr = min(entry->addr, start);
entry->size = top - entry->addr;
return; return;
} }
if (x == BOOT_MEM_MAP_MAX) { if (boot_mem_map.nr_map == BOOT_MEM_MAP_MAX) {
pr_err("Ooops! Too many entries in the memory map!\n"); pr_err("Ooops! Too many entries in the memory map!\n");
return; return;
} }

View File

@ -56,7 +56,7 @@ __asm__(
" .set pop \n" " .set pop \n"
" .endm \n"); " .endm \n");
void arch_local_irq_disable(void) notrace void arch_local_irq_disable(void)
{ {
preempt_disable(); preempt_disable();
__asm__ __volatile__( __asm__ __volatile__(
@ -93,7 +93,7 @@ __asm__(
" .set pop \n" " .set pop \n"
" .endm \n"); " .endm \n");
unsigned long arch_local_irq_save(void) notrace unsigned long arch_local_irq_save(void)
{ {
unsigned long flags; unsigned long flags;
preempt_disable(); preempt_disable();
@ -135,7 +135,7 @@ __asm__(
" .set pop \n" " .set pop \n"
" .endm \n"); " .endm \n");
void arch_local_irq_restore(unsigned long flags) notrace void arch_local_irq_restore(unsigned long flags)
{ {
unsigned long __tmp1; unsigned long __tmp1;
@ -159,7 +159,7 @@ void arch_local_irq_restore(unsigned long flags)
EXPORT_SYMBOL(arch_local_irq_restore); EXPORT_SYMBOL(arch_local_irq_restore);
void __arch_local_irq_restore(unsigned long flags) notrace void __arch_local_irq_restore(unsigned long flags)
{ {
unsigned long __tmp1; unsigned long __tmp1;

View File

@ -65,7 +65,8 @@ put_sigset32(compat_sigset_t __user *up, sigset_t *set, size_t sz)
{ {
compat_sigset_t s; compat_sigset_t s;
if (sz != sizeof *set) panic("put_sigset32()"); if (sz != sizeof *set)
return -EINVAL;
sigset_64to32(&s, set); sigset_64to32(&s, set);
return copy_to_user(up, &s, sizeof s); return copy_to_user(up, &s, sizeof s);
@ -77,7 +78,8 @@ get_sigset32(compat_sigset_t __user *up, sigset_t *set, size_t sz)
compat_sigset_t s; compat_sigset_t s;
int r; int r;
if (sz != sizeof *set) panic("put_sigset32()"); if (sz != sizeof *set)
return -EINVAL;
if ((r = copy_from_user(&s, up, sz)) == 0) { if ((r = copy_from_user(&s, up, sz)) == 0) {
sigset_32to64(set, &s); sigset_32to64(set, &s);

View File

@ -73,6 +73,8 @@ static unsigned long get_shared_area(struct address_space *mapping,
struct vm_area_struct *vma; struct vm_area_struct *vma;
int offset = mapping ? get_offset(mapping) : 0; int offset = mapping ? get_offset(mapping) : 0;
offset = (offset + (pgoff << PAGE_SHIFT)) & 0x3FF000;
addr = DCACHE_ALIGN(addr - offset) + offset; addr = DCACHE_ALIGN(addr - offset) + offset;
for (vma = find_vma(current->mm, addr); ; vma = vma->vm_next) { for (vma = find_vma(current->mm, addr); ; vma = vma->vm_next) {

View File

@ -231,6 +231,12 @@
interrupts = <2 7 0>; interrupts = <2 7 0>;
}; };
sclpc@3c00 {
compatible = "fsl,mpc5200-lpbfifo";
reg = <0x3c00 0x60>;
interrupts = <2 23 0>;
};
i2c@3d00 { i2c@3d00 {
#address-cells = <1>; #address-cells = <1>;
#size-cells = <0>; #size-cells = <0>;

View File

@ -86,12 +86,6 @@
reg = <0>; reg = <0>;
}; };
}; };
sclpc@3c00 {
compatible = "fsl,mpc5200-lpbfifo";
reg = <0x3c00 0x60>;
interrupts = <3 23 0>;
};
}; };
localbus { localbus {

View File

@ -59,7 +59,7 @@
#gpio-cells = <2>; #gpio-cells = <2>;
}; };
psc@2000 { /* PSC1 in ac97 mode */ audioplatform: psc@2000 { /* PSC1 in ac97 mode */
compatible = "mpc5200b-psc-ac97","fsl,mpc5200b-psc-ac97"; compatible = "mpc5200b-psc-ac97","fsl,mpc5200b-psc-ac97";
cell-index = <0>; cell-index = <0>;
}; };
@ -134,4 +134,9 @@
localbus { localbus {
status = "disabled"; status = "disabled";
}; };
sound {
compatible = "phytec,pcm030-audio-fabric";
asoc-platform = <&audioplatform>;
};
}; };

View File

@ -372,10 +372,11 @@ static int mpc52xx_irqhost_map(struct irq_domain *h, unsigned int virq,
case MPC52xx_IRQ_L1_MAIN: irqchip = &mpc52xx_main_irqchip; break; case MPC52xx_IRQ_L1_MAIN: irqchip = &mpc52xx_main_irqchip; break;
case MPC52xx_IRQ_L1_PERP: irqchip = &mpc52xx_periph_irqchip; break; case MPC52xx_IRQ_L1_PERP: irqchip = &mpc52xx_periph_irqchip; break;
case MPC52xx_IRQ_L1_SDMA: irqchip = &mpc52xx_sdma_irqchip; break; case MPC52xx_IRQ_L1_SDMA: irqchip = &mpc52xx_sdma_irqchip; break;
default: case MPC52xx_IRQ_L1_CRIT:
pr_err("%s: invalid irq: virq=%i, l1=%i, l2=%i\n", pr_warn("%s: Critical IRQ #%d is unsupported! Nopping it.\n",
__func__, virq, l1irq, l2irq); __func__, l2irq);
return -EINVAL; irq_set_chip(virq, &no_irq_chip);
return 0;
} }
irq_set_chip_and_handler(virq, irqchip, handle_level_irq); irq_set_chip_and_handler(virq, irqchip, handle_level_irq);

View File

@ -449,7 +449,7 @@ int eeh_rmv_from_parent_pe(struct eeh_dev *edev, int purge_pe)
if (list_empty(&pe->edevs)) { if (list_empty(&pe->edevs)) {
cnt = 0; cnt = 0;
list_for_each_entry(child, &pe->child_list, child) { list_for_each_entry(child, &pe->child_list, child) {
if (!(pe->type & EEH_PE_INVALID)) { if (!(child->type & EEH_PE_INVALID)) {
cnt++; cnt++;
break; break;
} }

View File

@ -220,7 +220,8 @@ static struct device_node *find_pe_dn(struct pci_dev *dev, int *total)
/* Get the top level device in the PE */ /* Get the top level device in the PE */
edev = of_node_to_eeh_dev(dn); edev = of_node_to_eeh_dev(dn);
edev = list_first_entry(&edev->pe->edevs, struct eeh_dev, list); if (edev->pe)
edev = list_first_entry(&edev->pe->edevs, struct eeh_dev, list);
dn = eeh_dev_to_of_node(edev); dn = eeh_dev_to_of_node(edev);
if (!dn) if (!dn)
return NULL; return NULL;

View File

@ -63,10 +63,13 @@ extern char *of_console_options;
extern void irq_trans_init(struct device_node *dp); extern void irq_trans_init(struct device_node *dp);
extern char *build_path_component(struct device_node *dp); extern char *build_path_component(struct device_node *dp);
/* SPARC has a local implementation */ /* SPARC has local implementations */
extern int of_address_to_resource(struct device_node *dev, int index, extern int of_address_to_resource(struct device_node *dev, int index,
struct resource *r); struct resource *r);
#define of_address_to_resource of_address_to_resource #define of_address_to_resource of_address_to_resource
void __iomem *of_iomap(struct device_node *node, int index);
#define of_iomap of_iomap
#endif /* __KERNEL__ */ #endif /* __KERNEL__ */
#endif /* _SPARC_PROM_H */ #endif /* _SPARC_PROM_H */

View File

@ -295,9 +295,7 @@ void do_rt_sigreturn(struct pt_regs *regs)
err |= restore_fpu_state(regs, fpu_save); err |= restore_fpu_state(regs, fpu_save);
err |= __copy_from_user(&set, &sf->mask, sizeof(sigset_t)); err |= __copy_from_user(&set, &sf->mask, sizeof(sigset_t));
err |= do_sigaltstack(&sf->stack, NULL, (unsigned long)sf); if (err || do_sigaltstack(&sf->stack, NULL, (unsigned long)sf) == -EFAULT)
if (err)
goto segv; goto segv;
err |= __get_user(rwin_save, &sf->rwin_save); err |= __get_user(rwin_save, &sf->rwin_save);

View File

@ -12,6 +12,8 @@
#include <asm/setup.h> #include <asm/setup.h>
#include <asm/desc.h> #include <asm/desc.h>
#undef memcpy /* Use memcpy from misc.c */
#include "eboot.h" #include "eboot.h"
static efi_system_table_t *sys_table; static efi_system_table_t *sys_table;

View File

@ -476,6 +476,3 @@ die:
setup_corrupt: setup_corrupt:
.byte 7 .byte 7
.string "No setup signature found...\n" .string "No setup signature found...\n"
.data
dummy: .long 0

View File

@ -205,21 +205,14 @@ static inline bool user_64bit_mode(struct pt_regs *regs)
} }
#endif #endif
/* #ifdef CONFIG_X86_32
* X86_32 CPUs don't save ss and esp if the CPU is already in kernel mode extern unsigned long kernel_stack_pointer(struct pt_regs *regs);
* when it traps. The previous stack will be directly underneath the saved #else
* registers, and 'sp/ss' won't even have been saved. Thus the '&regs->sp'.
*
* This is valid only for kernel mode traps.
*/
static inline unsigned long kernel_stack_pointer(struct pt_regs *regs) static inline unsigned long kernel_stack_pointer(struct pt_regs *regs)
{ {
#ifdef CONFIG_X86_32
return (unsigned long)(&regs->sp);
#else
return regs->sp; return regs->sp;
#endif
} }
#endif
#define GET_IP(regs) ((regs)->ip) #define GET_IP(regs) ((regs)->ip)
#define GET_FP(regs) ((regs)->bp) #define GET_FP(regs) ((regs)->bp)

View File

@ -631,6 +631,20 @@ static void __cpuinit init_amd(struct cpuinfo_x86 *c)
} }
} }
/*
* The way access filter has a performance penalty on some workloads.
* Disable it on the affected CPUs.
*/
if ((c->x86 == 0x15) &&
(c->x86_model >= 0x02) && (c->x86_model < 0x20)) {
u64 val;
if (!rdmsrl_safe(0xc0011021, &val) && !(val & 0x1E)) {
val |= 0x1E;
wrmsrl_safe(0xc0011021, val);
}
}
cpu_detect_cache_sizes(c); cpu_detect_cache_sizes(c);
/* Multi core CPU? */ /* Multi core CPU? */

View File

@ -6,7 +6,7 @@
* *
* Written by Jacob Shin - AMD, Inc. * Written by Jacob Shin - AMD, Inc.
* *
* Support: borislav.petkov@amd.com * Maintained by: Borislav Petkov <bp@alien8.de>
* *
* April 2006 * April 2006
* - added support for AMD Family 0x10 processors * - added support for AMD Family 0x10 processors

View File

@ -285,34 +285,39 @@ void cmci_clear(void)
raw_spin_unlock_irqrestore(&cmci_discover_lock, flags); raw_spin_unlock_irqrestore(&cmci_discover_lock, flags);
} }
static long cmci_rediscover_work_func(void *arg)
{
int banks;
/* Recheck banks in case CPUs don't all have the same */
if (cmci_supported(&banks))
cmci_discover(banks);
return 0;
}
/* /*
* After a CPU went down cycle through all the others and rediscover * After a CPU went down cycle through all the others and rediscover
* Must run in process context. * Must run in process context.
*/ */
void cmci_rediscover(int dying) void cmci_rediscover(int dying)
{ {
int banks; int cpu, banks;
int cpu;
cpumask_var_t old;
if (!cmci_supported(&banks)) if (!cmci_supported(&banks))
return; return;
if (!alloc_cpumask_var(&old, GFP_KERNEL))
return;
cpumask_copy(old, &current->cpus_allowed);
for_each_online_cpu(cpu) { for_each_online_cpu(cpu) {
if (cpu == dying) if (cpu == dying)
continue; continue;
if (set_cpus_allowed_ptr(current, cpumask_of(cpu)))
continue;
/* Recheck banks in case CPUs don't all have the same */
if (cmci_supported(&banks))
cmci_discover(banks);
}
set_cpus_allowed_ptr(current, old); if (cpu == smp_processor_id()) {
free_cpumask_var(old); cmci_rediscover_work_func(NULL);
continue;
}
work_on_cpu(cpu, cmci_rediscover_work_func, NULL);
}
} }
/* /*

View File

@ -995,8 +995,8 @@ END(interrupt)
*/ */
.p2align CONFIG_X86_L1_CACHE_SHIFT .p2align CONFIG_X86_L1_CACHE_SHIFT
common_interrupt: common_interrupt:
ASM_CLAC
XCPT_FRAME XCPT_FRAME
ASM_CLAC
addq $-0x80,(%rsp) /* Adjust vector to [-256,-1] range */ addq $-0x80,(%rsp) /* Adjust vector to [-256,-1] range */
interrupt do_IRQ interrupt do_IRQ
/* 0(%rsp): old_rsp-ARGOFFSET */ /* 0(%rsp): old_rsp-ARGOFFSET */
@ -1135,8 +1135,8 @@ END(common_interrupt)
*/ */
.macro apicinterrupt num sym do_sym .macro apicinterrupt num sym do_sym
ENTRY(\sym) ENTRY(\sym)
ASM_CLAC
INTR_FRAME INTR_FRAME
ASM_CLAC
pushq_cfi $~(\num) pushq_cfi $~(\num)
.Lcommon_\sym: .Lcommon_\sym:
interrupt \do_sym interrupt \do_sym
@ -1190,8 +1190,8 @@ apicinterrupt IRQ_WORK_VECTOR \
*/ */
.macro zeroentry sym do_sym .macro zeroentry sym do_sym
ENTRY(\sym) ENTRY(\sym)
ASM_CLAC
INTR_FRAME INTR_FRAME
ASM_CLAC
PARAVIRT_ADJUST_EXCEPTION_FRAME PARAVIRT_ADJUST_EXCEPTION_FRAME
pushq_cfi $-1 /* ORIG_RAX: no syscall to restart */ pushq_cfi $-1 /* ORIG_RAX: no syscall to restart */
subq $ORIG_RAX-R15, %rsp subq $ORIG_RAX-R15, %rsp
@ -1208,8 +1208,8 @@ END(\sym)
.macro paranoidzeroentry sym do_sym .macro paranoidzeroentry sym do_sym
ENTRY(\sym) ENTRY(\sym)
ASM_CLAC
INTR_FRAME INTR_FRAME
ASM_CLAC
PARAVIRT_ADJUST_EXCEPTION_FRAME PARAVIRT_ADJUST_EXCEPTION_FRAME
pushq_cfi $-1 /* ORIG_RAX: no syscall to restart */ pushq_cfi $-1 /* ORIG_RAX: no syscall to restart */
subq $ORIG_RAX-R15, %rsp subq $ORIG_RAX-R15, %rsp
@ -1227,8 +1227,8 @@ END(\sym)
#define INIT_TSS_IST(x) PER_CPU_VAR(init_tss) + (TSS_ist + ((x) - 1) * 8) #define INIT_TSS_IST(x) PER_CPU_VAR(init_tss) + (TSS_ist + ((x) - 1) * 8)
.macro paranoidzeroentry_ist sym do_sym ist .macro paranoidzeroentry_ist sym do_sym ist
ENTRY(\sym) ENTRY(\sym)
ASM_CLAC
INTR_FRAME INTR_FRAME
ASM_CLAC
PARAVIRT_ADJUST_EXCEPTION_FRAME PARAVIRT_ADJUST_EXCEPTION_FRAME
pushq_cfi $-1 /* ORIG_RAX: no syscall to restart */ pushq_cfi $-1 /* ORIG_RAX: no syscall to restart */
subq $ORIG_RAX-R15, %rsp subq $ORIG_RAX-R15, %rsp
@ -1247,8 +1247,8 @@ END(\sym)
.macro errorentry sym do_sym .macro errorentry sym do_sym
ENTRY(\sym) ENTRY(\sym)
ASM_CLAC
XCPT_FRAME XCPT_FRAME
ASM_CLAC
PARAVIRT_ADJUST_EXCEPTION_FRAME PARAVIRT_ADJUST_EXCEPTION_FRAME
subq $ORIG_RAX-R15, %rsp subq $ORIG_RAX-R15, %rsp
CFI_ADJUST_CFA_OFFSET ORIG_RAX-R15 CFI_ADJUST_CFA_OFFSET ORIG_RAX-R15
@ -1266,8 +1266,8 @@ END(\sym)
/* error code is on the stack already */ /* error code is on the stack already */
.macro paranoiderrorentry sym do_sym .macro paranoiderrorentry sym do_sym
ENTRY(\sym) ENTRY(\sym)
ASM_CLAC
XCPT_FRAME XCPT_FRAME
ASM_CLAC
PARAVIRT_ADJUST_EXCEPTION_FRAME PARAVIRT_ADJUST_EXCEPTION_FRAME
subq $ORIG_RAX-R15, %rsp subq $ORIG_RAX-R15, %rsp
CFI_ADJUST_CFA_OFFSET ORIG_RAX-R15 CFI_ADJUST_CFA_OFFSET ORIG_RAX-R15

View File

@ -8,8 +8,8 @@
* Tigran Aivazian <tigran@aivazian.fsnet.co.uk> * Tigran Aivazian <tigran@aivazian.fsnet.co.uk>
* *
* Maintainers: * Maintainers:
* Andreas Herrmann <andreas.herrmann3@amd.com> * Andreas Herrmann <herrmann.der.user@googlemail.com>
* Borislav Petkov <borislav.petkov@amd.com> * Borislav Petkov <bp@alien8.de>
* *
* This driver allows to upgrade microcode on F10h AMD * This driver allows to upgrade microcode on F10h AMD
* CPUs and later. * CPUs and later.
@ -190,6 +190,7 @@ static unsigned int verify_patch_size(int cpu, u32 patch_size,
#define F1XH_MPB_MAX_SIZE 2048 #define F1XH_MPB_MAX_SIZE 2048
#define F14H_MPB_MAX_SIZE 1824 #define F14H_MPB_MAX_SIZE 1824
#define F15H_MPB_MAX_SIZE 4096 #define F15H_MPB_MAX_SIZE 4096
#define F16H_MPB_MAX_SIZE 3458
switch (c->x86) { switch (c->x86) {
case 0x14: case 0x14:
@ -198,6 +199,9 @@ static unsigned int verify_patch_size(int cpu, u32 patch_size,
case 0x15: case 0x15:
max_size = F15H_MPB_MAX_SIZE; max_size = F15H_MPB_MAX_SIZE;
break; break;
case 0x16:
max_size = F16H_MPB_MAX_SIZE;
break;
default: default:
max_size = F1XH_MPB_MAX_SIZE; max_size = F1XH_MPB_MAX_SIZE;
break; break;

View File

@ -22,6 +22,7 @@
#include <linux/perf_event.h> #include <linux/perf_event.h>
#include <linux/hw_breakpoint.h> #include <linux/hw_breakpoint.h>
#include <linux/rcupdate.h> #include <linux/rcupdate.h>
#include <linux/module.h>
#include <asm/uaccess.h> #include <asm/uaccess.h>
#include <asm/pgtable.h> #include <asm/pgtable.h>
@ -166,6 +167,35 @@ static inline bool invalid_selector(u16 value)
#define FLAG_MASK FLAG_MASK_32 #define FLAG_MASK FLAG_MASK_32
/*
* X86_32 CPUs don't save ss and esp if the CPU is already in kernel mode
* when it traps. The previous stack will be directly underneath the saved
* registers, and 'sp/ss' won't even have been saved. Thus the '&regs->sp'.
*
* Now, if the stack is empty, '&regs->sp' is out of range. In this
* case we try to take the previous stack. To always return a non-null
* stack pointer we fall back to regs as stack if no previous stack
* exists.
*
* This is valid only for kernel mode traps.
*/
unsigned long kernel_stack_pointer(struct pt_regs *regs)
{
unsigned long context = (unsigned long)regs & ~(THREAD_SIZE - 1);
unsigned long sp = (unsigned long)&regs->sp;
struct thread_info *tinfo;
if (context == (sp & ~(THREAD_SIZE - 1)))
return sp;
tinfo = (struct thread_info *)context;
if (tinfo->previous_esp)
return tinfo->previous_esp;
return (unsigned long)regs;
}
EXPORT_SYMBOL_GPL(kernel_stack_pointer);
static unsigned long *pt_regs_access(struct pt_regs *regs, unsigned long regno) static unsigned long *pt_regs_access(struct pt_regs *regs, unsigned long regno)
{ {
BUILD_BUG_ON(offsetof(struct pt_regs, bx) != 0); BUILD_BUG_ON(offsetof(struct pt_regs, bx) != 0);

View File

@ -197,7 +197,7 @@ void flush_tlb_mm_range(struct mm_struct *mm, unsigned long start,
} }
if (end == TLB_FLUSH_ALL || tlb_flushall_shift == -1 if (end == TLB_FLUSH_ALL || tlb_flushall_shift == -1
|| vmflag == VM_HUGETLB) { || vmflag & VM_HUGETLB) {
local_flush_tlb(); local_flush_tlb();
goto flush_all; goto flush_all;
} }

View File

@ -115,6 +115,16 @@ static void sata_revid_read(struct sim_dev_reg *reg, u32 *value)
reg_read(reg, value); reg_read(reg, value);
} }
static void reg_noirq_read(struct sim_dev_reg *reg, u32 *value)
{
unsigned long flags;
raw_spin_lock_irqsave(&pci_config_lock, flags);
/* force interrupt pin value to 0 */
*value = reg->sim_reg.value & 0xfff00ff;
raw_spin_unlock_irqrestore(&pci_config_lock, flags);
}
static struct sim_dev_reg bus1_fixups[] = { static struct sim_dev_reg bus1_fixups[] = {
DEFINE_REG(2, 0, 0x10, (16*MB), reg_init, reg_read, reg_write) DEFINE_REG(2, 0, 0x10, (16*MB), reg_init, reg_read, reg_write)
DEFINE_REG(2, 0, 0x14, (256), reg_init, reg_read, reg_write) DEFINE_REG(2, 0, 0x14, (256), reg_init, reg_read, reg_write)
@ -144,6 +154,7 @@ static struct sim_dev_reg bus1_fixups[] = {
DEFINE_REG(11, 5, 0x10, (64*KB), reg_init, reg_read, reg_write) DEFINE_REG(11, 5, 0x10, (64*KB), reg_init, reg_read, reg_write)
DEFINE_REG(11, 6, 0x10, (256), reg_init, reg_read, reg_write) DEFINE_REG(11, 6, 0x10, (256), reg_init, reg_read, reg_write)
DEFINE_REG(11, 7, 0x10, (64*KB), reg_init, reg_read, reg_write) DEFINE_REG(11, 7, 0x10, (64*KB), reg_init, reg_read, reg_write)
DEFINE_REG(11, 7, 0x3c, 256, reg_init, reg_noirq_read, reg_write)
DEFINE_REG(12, 0, 0x10, (128*KB), reg_init, reg_read, reg_write) DEFINE_REG(12, 0, 0x10, (128*KB), reg_init, reg_read, reg_write)
DEFINE_REG(12, 0, 0x14, (256), reg_init, reg_read, reg_write) DEFINE_REG(12, 0, 0x14, (256), reg_init, reg_read, reg_write)
DEFINE_REG(12, 1, 0x10, (1024), reg_init, reg_read, reg_write) DEFINE_REG(12, 1, 0x10, (1024), reg_init, reg_read, reg_write)
@ -161,8 +172,10 @@ static struct sim_dev_reg bus1_fixups[] = {
DEFINE_REG(16, 0, 0x10, (64*KB), reg_init, reg_read, reg_write) DEFINE_REG(16, 0, 0x10, (64*KB), reg_init, reg_read, reg_write)
DEFINE_REG(16, 0, 0x14, (64*MB), reg_init, reg_read, reg_write) DEFINE_REG(16, 0, 0x14, (64*MB), reg_init, reg_read, reg_write)
DEFINE_REG(16, 0, 0x18, (64*MB), reg_init, reg_read, reg_write) DEFINE_REG(16, 0, 0x18, (64*MB), reg_init, reg_read, reg_write)
DEFINE_REG(16, 0, 0x3c, 256, reg_init, reg_noirq_read, reg_write)
DEFINE_REG(17, 0, 0x10, (128*KB), reg_init, reg_read, reg_write) DEFINE_REG(17, 0, 0x10, (128*KB), reg_init, reg_read, reg_write)
DEFINE_REG(18, 0, 0x10, (1*KB), reg_init, reg_read, reg_write) DEFINE_REG(18, 0, 0x10, (1*KB), reg_init, reg_read, reg_write)
DEFINE_REG(18, 0, 0x3c, 256, reg_init, reg_noirq_read, reg_write)
}; };
static void __init init_sim_regs(void) static void __init init_sim_regs(void)

View File

@ -21,12 +21,25 @@
#include <asm/i8259.h> #include <asm/i8259.h>
#include <asm/io.h> #include <asm/io.h>
#include <asm/io_apic.h> #include <asm/io_apic.h>
#include <asm/emergency-restart.h>
static int ce4100_i8042_detect(void) static int ce4100_i8042_detect(void)
{ {
return 0; return 0;
} }
/*
* The CE4100 platform has an internal 8051 Microcontroller which is
* responsible for signaling to the external Power Management Unit the
* intention to reset, reboot or power off the system. This 8051 device has
* its command register mapped at I/O port 0xcf9 and the value 0x4 is used
* to power off the system.
*/
static void ce4100_power_off(void)
{
outb(0x4, 0xcf9);
}
#ifdef CONFIG_SERIAL_8250 #ifdef CONFIG_SERIAL_8250
static unsigned int mem_serial_in(struct uart_port *p, int offset) static unsigned int mem_serial_in(struct uart_port *p, int offset)
@ -139,8 +152,19 @@ void __init x86_ce4100_early_setup(void)
x86_init.mpparse.find_smp_config = x86_init_noop; x86_init.mpparse.find_smp_config = x86_init_noop;
x86_init.pci.init = ce4100_pci_init; x86_init.pci.init = ce4100_pci_init;
/*
* By default, the reboot method is ACPI which is supported by the
* CE4100 bootloader CEFDK using FADT.ResetReg Address and ResetValue
* the bootloader will however issue a system power off instead of
* reboot. By using BOOT_KBD we ensure proper system reboot as
* expected.
*/
reboot_type = BOOT_KBD;
#ifdef CONFIG_X86_IO_APIC #ifdef CONFIG_X86_IO_APIC
x86_init.pci.init_irq = sdv_pci_init; x86_init.pci.init_irq = sdv_pci_init;
x86_init.mpparse.setup_ioapic_ids = setup_ioapic_ids_from_mpc_nocheck; x86_init.mpparse.setup_ioapic_ids = setup_ioapic_ids_from_mpc_nocheck;
#endif #endif
pm_power_off = ce4100_power_off;
} }

View File

@ -52,11 +52,17 @@ void blk_execute_rq_nowait(struct request_queue *q, struct gendisk *bd_disk,
rq_end_io_fn *done) rq_end_io_fn *done)
{ {
int where = at_head ? ELEVATOR_INSERT_FRONT : ELEVATOR_INSERT_BACK; int where = at_head ? ELEVATOR_INSERT_FRONT : ELEVATOR_INSERT_BACK;
bool is_pm_resume;
WARN_ON(irqs_disabled()); WARN_ON(irqs_disabled());
rq->rq_disk = bd_disk; rq->rq_disk = bd_disk;
rq->end_io = done; rq->end_io = done;
/*
* need to check this before __blk_run_queue(), because rq can
* be freed before that returns.
*/
is_pm_resume = rq->cmd_type == REQ_TYPE_PM_RESUME;
spin_lock_irq(q->queue_lock); spin_lock_irq(q->queue_lock);
@ -71,7 +77,7 @@ void blk_execute_rq_nowait(struct request_queue *q, struct gendisk *bd_disk,
__elv_add_request(q, rq, where); __elv_add_request(q, rq, where);
__blk_run_queue(q); __blk_run_queue(q);
/* the queue is stopped so it won't be run */ /* the queue is stopped so it won't be run */
if (rq->cmd_type == REQ_TYPE_PM_RESUME) if (is_pm_resume)
q->request_fn(q); q->request_fn(q);
spin_unlock_irq(q->queue_lock); spin_unlock_irq(q->queue_lock);
} }

View File

@ -238,7 +238,7 @@ static int __devexit ahci_remove(struct platform_device *pdev)
return 0; return 0;
} }
#ifdef CONFIG_PM #ifdef CONFIG_PM_SLEEP
static int ahci_suspend(struct device *dev) static int ahci_suspend(struct device *dev)
{ {
struct ahci_platform_data *pdata = dev_get_platdata(dev); struct ahci_platform_data *pdata = dev_get_platdata(dev);

View File

@ -1105,10 +1105,15 @@ static int ata_acpi_bind_device(struct ata_port *ap, struct scsi_device *sdev,
struct acpi_device *acpi_dev; struct acpi_device *acpi_dev;
struct acpi_device_power_state *states; struct acpi_device_power_state *states;
if (ap->flags & ATA_FLAG_ACPI_SATA) if (ap->flags & ATA_FLAG_ACPI_SATA) {
ata_dev = &ap->link.device[sdev->channel]; if (!sata_pmp_attached(ap))
else ata_dev = &ap->link.device[sdev->id];
else
ata_dev = &ap->pmp_link[sdev->channel].device[sdev->id];
}
else {
ata_dev = &ap->link.device[sdev->id]; ata_dev = &ap->link.device[sdev->id];
}
*handle = ata_dev_acpi_handle(ata_dev); *handle = ata_dev_acpi_handle(ata_dev);

View File

@ -2942,6 +2942,10 @@ const struct ata_timing *ata_timing_find_mode(u8 xfer_mode)
if (xfer_mode == t->mode) if (xfer_mode == t->mode)
return t; return t;
WARN_ONCE(true, "%s: unable to find timing for xfer_mode 0x%x\n",
__func__, xfer_mode);
return NULL; return NULL;
} }

View File

@ -1052,6 +1052,8 @@ static void ata_scsi_sdev_config(struct scsi_device *sdev)
{ {
sdev->use_10_for_rw = 1; sdev->use_10_for_rw = 1;
sdev->use_10_for_ms = 1; sdev->use_10_for_ms = 1;
sdev->no_report_opcodes = 1;
sdev->no_write_same = 1;
/* Schedule policy is determined by ->qc_defer() callback and /* Schedule policy is determined by ->qc_defer() callback and
* it needs to see every deferred qc. Set dev_blocked to 1 to * it needs to see every deferred qc. Set dev_blocked to 1 to

View File

@ -317,6 +317,12 @@ static int cf_init(struct arasan_cf_dev *acdev)
return ret; return ret;
} }
ret = clk_set_rate(acdev->clk, 166000000);
if (ret) {
dev_warn(acdev->host->dev, "clock set rate failed");
return ret;
}
spin_lock_irqsave(&acdev->host->lock, flags); spin_lock_irqsave(&acdev->host->lock, flags);
/* configure CF interface clock */ /* configure CF interface clock */
writel((pdata->cf_if_clk <= CF_IF_CLK_200M) ? pdata->cf_if_clk : writel((pdata->cf_if_clk <= CF_IF_CLK_200M) ? pdata->cf_if_clk :
@ -908,7 +914,7 @@ static int __devexit arasan_cf_remove(struct platform_device *pdev)
return 0; return 0;
} }
#ifdef CONFIG_PM #ifdef CONFIG_PM_SLEEP
static int arasan_cf_suspend(struct device *dev) static int arasan_cf_suspend(struct device *dev)
{ {
struct ata_host *host = dev_get_drvdata(dev); struct ata_host *host = dev_get_drvdata(dev);

View File

@ -260,7 +260,7 @@ static const struct of_device_id ahci_of_match[] = {
}; };
MODULE_DEVICE_TABLE(of, ahci_of_match); MODULE_DEVICE_TABLE(of, ahci_of_match);
static int __init ahci_highbank_probe(struct platform_device *pdev) static int __devinit ahci_highbank_probe(struct platform_device *pdev)
{ {
struct device *dev = &pdev->dev; struct device *dev = &pdev->dev;
struct ahci_host_priv *hpriv; struct ahci_host_priv *hpriv;
@ -378,7 +378,7 @@ static int __devexit ahci_highbank_remove(struct platform_device *pdev)
return 0; return 0;
} }
#ifdef CONFIG_PM #ifdef CONFIG_PM_SLEEP
static int ahci_highbank_suspend(struct device *dev) static int ahci_highbank_suspend(struct device *dev)
{ {
struct ata_host *host = dev_get_drvdata(dev); struct ata_host *host = dev_get_drvdata(dev);

View File

@ -142,6 +142,39 @@ static int k2_sata_scr_write(struct ata_link *link,
return 0; return 0;
} }
static int k2_sata_softreset(struct ata_link *link,
unsigned int *class, unsigned long deadline)
{
u8 dmactl;
void __iomem *mmio = link->ap->ioaddr.bmdma_addr;
dmactl = readb(mmio + ATA_DMA_CMD);
/* Clear the start bit */
if (dmactl & ATA_DMA_START) {
dmactl &= ~ATA_DMA_START;
writeb(dmactl, mmio + ATA_DMA_CMD);
}
return ata_sff_softreset(link, class, deadline);
}
static int k2_sata_hardreset(struct ata_link *link,
unsigned int *class, unsigned long deadline)
{
u8 dmactl;
void __iomem *mmio = link->ap->ioaddr.bmdma_addr;
dmactl = readb(mmio + ATA_DMA_CMD);
/* Clear the start bit */
if (dmactl & ATA_DMA_START) {
dmactl &= ~ATA_DMA_START;
writeb(dmactl, mmio + ATA_DMA_CMD);
}
return sata_sff_hardreset(link, class, deadline);
}
static void k2_sata_tf_load(struct ata_port *ap, const struct ata_taskfile *tf) static void k2_sata_tf_load(struct ata_port *ap, const struct ata_taskfile *tf)
{ {
@ -346,6 +379,8 @@ static struct scsi_host_template k2_sata_sht = {
static struct ata_port_operations k2_sata_ops = { static struct ata_port_operations k2_sata_ops = {
.inherits = &ata_bmdma_port_ops, .inherits = &ata_bmdma_port_ops,
.softreset = k2_sata_softreset,
.hardreset = k2_sata_hardreset,
.sff_tf_load = k2_sata_tf_load, .sff_tf_load = k2_sata_tf_load,
.sff_tf_read = k2_sata_tf_read, .sff_tf_read = k2_sata_tf_read,
.sff_check_status = k2_stat_check_status, .sff_check_status = k2_stat_check_status,

View File

@ -451,7 +451,7 @@ int dev_pm_qos_add_ancestor_request(struct device *dev,
if (ancestor) if (ancestor)
error = dev_pm_qos_add_request(ancestor, req, value); error = dev_pm_qos_add_request(ancestor, req, value);
if (error) if (error < 0)
req->dev = NULL; req->dev = NULL;
return error; return error;

View File

@ -120,6 +120,8 @@ int _regmap_write(struct regmap *map, unsigned int reg,
struct regmap_range_node { struct regmap_range_node {
struct rb_node node; struct rb_node node;
const char *name;
struct regmap *map;
unsigned int range_min; unsigned int range_min;
unsigned int range_max; unsigned int range_max;

View File

@ -56,15 +56,15 @@ static const struct file_operations regmap_name_fops = {
.llseek = default_llseek, .llseek = default_llseek,
}; };
static ssize_t regmap_map_read_file(struct file *file, char __user *user_buf, static ssize_t regmap_read_debugfs(struct regmap *map, unsigned int from,
size_t count, loff_t *ppos) unsigned int to, char __user *user_buf,
size_t count, loff_t *ppos)
{ {
int reg_len, val_len, tot_len; int reg_len, val_len, tot_len;
size_t buf_pos = 0; size_t buf_pos = 0;
loff_t p = 0; loff_t p = 0;
ssize_t ret; ssize_t ret;
int i; int i;
struct regmap *map = file->private_data;
char *buf; char *buf;
unsigned int val; unsigned int val;
@ -80,7 +80,7 @@ static ssize_t regmap_map_read_file(struct file *file, char __user *user_buf,
val_len = 2 * map->format.val_bytes; val_len = 2 * map->format.val_bytes;
tot_len = reg_len + val_len + 3; /* : \n */ tot_len = reg_len + val_len + 3; /* : \n */
for (i = 0; i <= map->max_register; i += map->reg_stride) { for (i = from; i <= to; i += map->reg_stride) {
if (!regmap_readable(map, i)) if (!regmap_readable(map, i))
continue; continue;
@ -95,7 +95,7 @@ static ssize_t regmap_map_read_file(struct file *file, char __user *user_buf,
/* Format the register */ /* Format the register */
snprintf(buf + buf_pos, count - buf_pos, "%.*x: ", snprintf(buf + buf_pos, count - buf_pos, "%.*x: ",
reg_len, i); reg_len, i - from);
buf_pos += reg_len + 2; buf_pos += reg_len + 2;
/* Format the value, write all X if we can't read */ /* Format the value, write all X if we can't read */
@ -126,6 +126,15 @@ out:
return ret; return ret;
} }
static ssize_t regmap_map_read_file(struct file *file, char __user *user_buf,
size_t count, loff_t *ppos)
{
struct regmap *map = file->private_data;
return regmap_read_debugfs(map, 0, map->max_register, user_buf,
count, ppos);
}
#undef REGMAP_ALLOW_WRITE_DEBUGFS #undef REGMAP_ALLOW_WRITE_DEBUGFS
#ifdef REGMAP_ALLOW_WRITE_DEBUGFS #ifdef REGMAP_ALLOW_WRITE_DEBUGFS
/* /*
@ -174,6 +183,22 @@ static const struct file_operations regmap_map_fops = {
.llseek = default_llseek, .llseek = default_llseek,
}; };
static ssize_t regmap_range_read_file(struct file *file, char __user *user_buf,
size_t count, loff_t *ppos)
{
struct regmap_range_node *range = file->private_data;
struct regmap *map = range->map;
return regmap_read_debugfs(map, range->range_min, range->range_max,
user_buf, count, ppos);
}
static const struct file_operations regmap_range_fops = {
.open = simple_open,
.read = regmap_range_read_file,
.llseek = default_llseek,
};
static ssize_t regmap_access_read_file(struct file *file, static ssize_t regmap_access_read_file(struct file *file,
char __user *user_buf, size_t count, char __user *user_buf, size_t count,
loff_t *ppos) loff_t *ppos)
@ -244,6 +269,9 @@ static const struct file_operations regmap_access_fops = {
void regmap_debugfs_init(struct regmap *map, const char *name) void regmap_debugfs_init(struct regmap *map, const char *name)
{ {
struct rb_node *next;
struct regmap_range_node *range_node;
if (name) { if (name) {
map->debugfs_name = kasprintf(GFP_KERNEL, "%s-%s", map->debugfs_name = kasprintf(GFP_KERNEL, "%s-%s",
dev_name(map->dev), name); dev_name(map->dev), name);
@ -276,6 +304,18 @@ void regmap_debugfs_init(struct regmap *map, const char *name)
debugfs_create_bool("cache_bypass", 0400, map->debugfs, debugfs_create_bool("cache_bypass", 0400, map->debugfs,
&map->cache_bypass); &map->cache_bypass);
} }
next = rb_first(&map->range_tree);
while (next) {
range_node = rb_entry(next, struct regmap_range_node, node);
if (range_node->name)
debugfs_create_file(range_node->name, 0400,
map->debugfs, range_node,
&regmap_range_fops);
next = rb_next(&range_node->node);
}
} }
void regmap_debugfs_exit(struct regmap *map) void regmap_debugfs_exit(struct regmap *map)

View File

@ -519,20 +519,38 @@ struct regmap *regmap_init(struct device *dev,
} }
map->range_tree = RB_ROOT; map->range_tree = RB_ROOT;
for (i = 0; i < config->n_ranges; i++) { for (i = 0; i < config->num_ranges; i++) {
const struct regmap_range_cfg *range_cfg = &config->ranges[i]; const struct regmap_range_cfg *range_cfg = &config->ranges[i];
struct regmap_range_node *new; struct regmap_range_node *new;
/* Sanity check */ /* Sanity check */
if (range_cfg->range_max < range_cfg->range_min || if (range_cfg->range_max < range_cfg->range_min) {
range_cfg->range_max > map->max_register || dev_err(map->dev, "Invalid range %d: %d < %d\n", i,
range_cfg->selector_reg > map->max_register || range_cfg->range_max, range_cfg->range_min);
range_cfg->window_len == 0)
goto err_range; goto err_range;
}
if (range_cfg->range_max > map->max_register) {
dev_err(map->dev, "Invalid range %d: %d > %d\n", i,
range_cfg->range_max, map->max_register);
goto err_range;
}
if (range_cfg->selector_reg > map->max_register) {
dev_err(map->dev,
"Invalid range %d: selector out of map\n", i);
goto err_range;
}
if (range_cfg->window_len == 0) {
dev_err(map->dev, "Invalid range %d: window_len 0\n",
i);
goto err_range;
}
/* Make sure, that this register range has no selector /* Make sure, that this register range has no selector
or data window within its boundary */ or data window within its boundary */
for (j = 0; j < config->n_ranges; j++) { for (j = 0; j < config->num_ranges; j++) {
unsigned sel_reg = config->ranges[j].selector_reg; unsigned sel_reg = config->ranges[j].selector_reg;
unsigned win_min = config->ranges[j].window_start; unsigned win_min = config->ranges[j].window_start;
unsigned win_max = win_min + unsigned win_max = win_min +
@ -540,11 +558,17 @@ struct regmap *regmap_init(struct device *dev,
if (range_cfg->range_min <= sel_reg && if (range_cfg->range_min <= sel_reg &&
sel_reg <= range_cfg->range_max) { sel_reg <= range_cfg->range_max) {
dev_err(map->dev,
"Range %d: selector for %d in window\n",
i, j);
goto err_range; goto err_range;
} }
if (!(win_max < range_cfg->range_min || if (!(win_max < range_cfg->range_min ||
win_min > range_cfg->range_max)) { win_min > range_cfg->range_max)) {
dev_err(map->dev,
"Range %d: window for %d in window\n",
i, j);
goto err_range; goto err_range;
} }
} }
@ -555,6 +579,8 @@ struct regmap *regmap_init(struct device *dev,
goto err_range; goto err_range;
} }
new->map = map;
new->name = range_cfg->name;
new->range_min = range_cfg->range_min; new->range_min = range_cfg->range_min;
new->range_max = range_cfg->range_max; new->range_max = range_cfg->range_max;
new->selector_reg = range_cfg->selector_reg; new->selector_reg = range_cfg->selector_reg;
@ -564,6 +590,7 @@ struct regmap *regmap_init(struct device *dev,
new->window_len = range_cfg->window_len; new->window_len = range_cfg->window_len;
if (_regmap_range_add(map, new) == false) { if (_regmap_range_add(map, new) == false) {
dev_err(map->dev, "Failed to add range %d\n", i);
kfree(new); kfree(new);
goto err_range; goto err_range;
} }
@ -579,7 +606,7 @@ struct regmap *regmap_init(struct device *dev,
} }
ret = regcache_init(map, config); ret = regcache_init(map, config);
if (ret < 0) if (ret != 0)
goto err_range; goto err_range;
regmap_debugfs_init(map, config->name); regmap_debugfs_init(map, config->name);
@ -738,59 +765,57 @@ struct regmap *dev_get_regmap(struct device *dev, const char *name)
EXPORT_SYMBOL_GPL(dev_get_regmap); EXPORT_SYMBOL_GPL(dev_get_regmap);
static int _regmap_select_page(struct regmap *map, unsigned int *reg, static int _regmap_select_page(struct regmap *map, unsigned int *reg,
struct regmap_range_node *range,
unsigned int val_num) unsigned int val_num)
{ {
struct regmap_range_node *range;
void *orig_work_buf; void *orig_work_buf;
unsigned int win_offset; unsigned int win_offset;
unsigned int win_page; unsigned int win_page;
bool page_chg; bool page_chg;
int ret; int ret;
range = _regmap_range_lookup(map, *reg); win_offset = (*reg - range->range_min) % range->window_len;
if (range) { win_page = (*reg - range->range_min) / range->window_len;
win_offset = (*reg - range->range_min) % range->window_len;
win_page = (*reg - range->range_min) / range->window_len;
if (val_num > 1) { if (val_num > 1) {
/* Bulk write shouldn't cross range boundary */ /* Bulk write shouldn't cross range boundary */
if (*reg + val_num - 1 > range->range_max) if (*reg + val_num - 1 > range->range_max)
return -EINVAL; return -EINVAL;
/* ... or single page boundary */ /* ... or single page boundary */
if (val_num > range->window_len - win_offset) if (val_num > range->window_len - win_offset)
return -EINVAL; return -EINVAL;
}
/* It is possible to have selector register inside data window.
In that case, selector register is located on every page and
it needs no page switching, when accessed alone. */
if (val_num > 1 ||
range->window_start + win_offset != range->selector_reg) {
/* Use separate work_buf during page switching */
orig_work_buf = map->work_buf;
map->work_buf = map->selector_work_buf;
ret = _regmap_update_bits(map, range->selector_reg,
range->selector_mask,
win_page << range->selector_shift,
&page_chg);
map->work_buf = orig_work_buf;
if (ret < 0)
return ret;
}
*reg = range->window_start + win_offset;
} }
/* It is possible to have selector register inside data window.
In that case, selector register is located on every page and
it needs no page switching, when accessed alone. */
if (val_num > 1 ||
range->window_start + win_offset != range->selector_reg) {
/* Use separate work_buf during page switching */
orig_work_buf = map->work_buf;
map->work_buf = map->selector_work_buf;
ret = _regmap_update_bits(map, range->selector_reg,
range->selector_mask,
win_page << range->selector_shift,
&page_chg);
map->work_buf = orig_work_buf;
if (ret != 0)
return ret;
}
*reg = range->window_start + win_offset;
return 0; return 0;
} }
static int _regmap_raw_write(struct regmap *map, unsigned int reg, static int _regmap_raw_write(struct regmap *map, unsigned int reg,
const void *val, size_t val_len) const void *val, size_t val_len)
{ {
struct regmap_range_node *range;
u8 *u8 = map->work_buf; u8 *u8 = map->work_buf;
void *buf; void *buf;
int ret = -ENOTSUPP; int ret = -ENOTSUPP;
@ -825,9 +850,35 @@ static int _regmap_raw_write(struct regmap *map, unsigned int reg,
} }
} }
ret = _regmap_select_page(map, &reg, val_len / map->format.val_bytes); range = _regmap_range_lookup(map, reg);
if (ret < 0) if (range) {
return ret; int val_num = val_len / map->format.val_bytes;
int win_offset = (reg - range->range_min) % range->window_len;
int win_residue = range->window_len - win_offset;
/* If the write goes beyond the end of the window split it */
while (val_num > win_residue) {
dev_dbg(map->dev, "Writing window %d/%d\n",
win_residue, val_len / map->format.val_bytes);
ret = _regmap_raw_write(map, reg, val, win_residue *
map->format.val_bytes);
if (ret != 0)
return ret;
reg += win_residue;
val_num -= win_residue;
val += win_residue * map->format.val_bytes;
val_len -= win_residue * map->format.val_bytes;
win_offset = (reg - range->range_min) %
range->window_len;
win_residue = range->window_len - win_offset;
}
ret = _regmap_select_page(map, &reg, range, val_num);
if (ret != 0)
return ret;
}
map->format.format_reg(map->work_buf, reg, map->reg_shift); map->format.format_reg(map->work_buf, reg, map->reg_shift);
@ -876,6 +927,7 @@ static int _regmap_raw_write(struct regmap *map, unsigned int reg,
int _regmap_write(struct regmap *map, unsigned int reg, int _regmap_write(struct regmap *map, unsigned int reg,
unsigned int val) unsigned int val)
{ {
struct regmap_range_node *range;
int ret; int ret;
BUG_ON(!map->format.format_write && !map->format.format_val); BUG_ON(!map->format.format_write && !map->format.format_val);
@ -897,9 +949,12 @@ int _regmap_write(struct regmap *map, unsigned int reg,
trace_regmap_reg_write(map->dev, reg, val); trace_regmap_reg_write(map->dev, reg, val);
if (map->format.format_write) { if (map->format.format_write) {
ret = _regmap_select_page(map, &reg, 1); range = _regmap_range_lookup(map, reg);
if (ret < 0) if (range) {
return ret; ret = _regmap_select_page(map, &reg, range, 1);
if (ret != 0)
return ret;
}
map->format.format_write(map, reg, val); map->format.format_write(map, reg, val);
@ -1055,12 +1110,17 @@ EXPORT_SYMBOL_GPL(regmap_bulk_write);
static int _regmap_raw_read(struct regmap *map, unsigned int reg, void *val, static int _regmap_raw_read(struct regmap *map, unsigned int reg, void *val,
unsigned int val_len) unsigned int val_len)
{ {
struct regmap_range_node *range;
u8 *u8 = map->work_buf; u8 *u8 = map->work_buf;
int ret; int ret;
ret = _regmap_select_page(map, &reg, val_len / map->format.val_bytes); range = _regmap_range_lookup(map, reg);
if (ret < 0) if (range) {
return ret; ret = _regmap_select_page(map, &reg, range,
val_len / map->format.val_bytes);
if (ret != 0)
return ret;
}
map->format.format_reg(map->work_buf, reg, map->reg_shift); map->format.format_reg(map->work_buf, reg, map->reg_shift);

View File

@ -935,7 +935,7 @@ aoe_end_request(struct aoedev *d, struct request *rq, int fastfail)
/* cf. http://lkml.org/lkml/2006/10/31/28 */ /* cf. http://lkml.org/lkml/2006/10/31/28 */
if (!fastfail) if (!fastfail)
q->request_fn(q); __blk_run_queue(q);
} }
static void static void

View File

@ -4330,6 +4330,7 @@ out_unreg_region:
out_unreg_blkdev: out_unreg_blkdev:
unregister_blkdev(FLOPPY_MAJOR, "fd"); unregister_blkdev(FLOPPY_MAJOR, "fd");
out_put_disk: out_put_disk:
destroy_workqueue(floppy_wq);
for (drive = 0; drive < N_DRIVE; drive++) { for (drive = 0; drive < N_DRIVE; drive++) {
if (!disks[drive]) if (!disks[drive])
break; break;
@ -4340,7 +4341,6 @@ out_put_disk:
} }
put_disk(disks[drive]); put_disk(disks[drive]);
} }
destroy_workqueue(floppy_wq);
return err; return err;
} }
@ -4555,6 +4555,8 @@ static void __exit floppy_module_exit(void)
unregister_blkdev(FLOPPY_MAJOR, "fd"); unregister_blkdev(FLOPPY_MAJOR, "fd");
platform_driver_unregister(&floppy_driver); platform_driver_unregister(&floppy_driver);
destroy_workqueue(floppy_wq);
for (drive = 0; drive < N_DRIVE; drive++) { for (drive = 0; drive < N_DRIVE; drive++) {
del_timer_sync(&motor_off_timer[drive]); del_timer_sync(&motor_off_timer[drive]);
@ -4578,7 +4580,6 @@ static void __exit floppy_module_exit(void)
cancel_delayed_work_sync(&fd_timeout); cancel_delayed_work_sync(&fd_timeout);
cancel_delayed_work_sync(&fd_timer); cancel_delayed_work_sync(&fd_timer);
destroy_workqueue(floppy_wq);
if (atomic_read(&usage_count)) if (atomic_read(&usage_count))
floppy_release_irq_and_dma(); floppy_release_irq_and_dma();

View File

@ -559,7 +559,7 @@ static void mtip_timeout_function(unsigned long int data)
struct mtip_cmd *command; struct mtip_cmd *command;
int tag, cmdto_cnt = 0; int tag, cmdto_cnt = 0;
unsigned int bit, group; unsigned int bit, group;
unsigned int num_command_slots = port->dd->slot_groups * 32; unsigned int num_command_slots;
unsigned long to, tagaccum[SLOTBITS_IN_LONGS]; unsigned long to, tagaccum[SLOTBITS_IN_LONGS];
if (unlikely(!port)) if (unlikely(!port))
@ -572,6 +572,7 @@ static void mtip_timeout_function(unsigned long int data)
} }
/* clear the tag accumulator */ /* clear the tag accumulator */
memset(tagaccum, 0, SLOTBITS_IN_LONGS * sizeof(long)); memset(tagaccum, 0, SLOTBITS_IN_LONGS * sizeof(long));
num_command_slots = port->dd->slot_groups * 32;
for (tag = 0; tag < num_command_slots; tag++) { for (tag = 0; tag < num_command_slots; tag++) {
/* /*
@ -2218,8 +2219,8 @@ static int exec_drive_taskfile(struct driver_data *dd,
fis.device); fis.device);
/* check for erase mode support during secure erase.*/ /* check for erase mode support during secure erase.*/
if ((fis.command == ATA_CMD_SEC_ERASE_UNIT) if ((fis.command == ATA_CMD_SEC_ERASE_UNIT) && outbuf &&
&& (outbuf[0] & MTIP_SEC_ERASE_MODE)) { (outbuf[0] & MTIP_SEC_ERASE_MODE)) {
erasemode = 1; erasemode = 1;
} }
@ -2439,7 +2440,7 @@ static int mtip_hw_ioctl(struct driver_data *dd, unsigned int cmd,
* return value * return value
* None * None
*/ */
static void mtip_hw_submit_io(struct driver_data *dd, sector_t start, static void mtip_hw_submit_io(struct driver_data *dd, sector_t sector,
int nsect, int nents, int tag, void *callback, int nsect, int nents, int tag, void *callback,
void *data, int dir) void *data, int dir)
{ {
@ -2447,6 +2448,7 @@ static void mtip_hw_submit_io(struct driver_data *dd, sector_t start,
struct mtip_port *port = dd->port; struct mtip_port *port = dd->port;
struct mtip_cmd *command = &port->commands[tag]; struct mtip_cmd *command = &port->commands[tag];
int dma_dir = (dir == READ) ? DMA_FROM_DEVICE : DMA_TO_DEVICE; int dma_dir = (dir == READ) ? DMA_FROM_DEVICE : DMA_TO_DEVICE;
u64 start = sector;
/* Map the scatter list for DMA access */ /* Map the scatter list for DMA access */
nents = dma_map_sg(&dd->pdev->dev, command->sg, nents, dma_dir); nents = dma_map_sg(&dd->pdev->dev, command->sg, nents, dma_dir);
@ -2465,8 +2467,12 @@ static void mtip_hw_submit_io(struct driver_data *dd, sector_t start,
fis->opts = 1 << 7; fis->opts = 1 << 7;
fis->command = fis->command =
(dir == READ ? ATA_CMD_FPDMA_READ : ATA_CMD_FPDMA_WRITE); (dir == READ ? ATA_CMD_FPDMA_READ : ATA_CMD_FPDMA_WRITE);
*((unsigned int *) &fis->lba_low) = (start & 0xFFFFFF); fis->lba_low = start & 0xFF;
*((unsigned int *) &fis->lba_low_ex) = ((start >> 24) & 0xFFFFFF); fis->lba_mid = (start >> 8) & 0xFF;
fis->lba_hi = (start >> 16) & 0xFF;
fis->lba_low_ex = (start >> 24) & 0xFF;
fis->lba_mid_ex = (start >> 32) & 0xFF;
fis->lba_hi_ex = (start >> 40) & 0xFF;
fis->device = 1 << 6; fis->device = 1 << 6;
fis->features = nsect & 0xFF; fis->features = nsect & 0xFF;
fis->features_ex = (nsect >> 8) & 0xFF; fis->features_ex = (nsect >> 8) & 0xFF;

View File

@ -34,7 +34,7 @@
#define PCIE_CONFIG_EXT_DEVICE_CONTROL_OFFSET 0x48 #define PCIE_CONFIG_EXT_DEVICE_CONTROL_OFFSET 0x48
/* check for erase mode support during secure erase */ /* check for erase mode support during secure erase */
#define MTIP_SEC_ERASE_MODE 0x3 #define MTIP_SEC_ERASE_MODE 0x2
/* # of times to retry timed out/failed IOs */ /* # of times to retry timed out/failed IOs */
#define MTIP_MAX_RETRIES 2 #define MTIP_MAX_RETRIES 2
@ -155,14 +155,14 @@ enum {
MTIP_DDF_REBUILD_FAILED_BIT = 8, MTIP_DDF_REBUILD_FAILED_BIT = 8,
}; };
__packed struct smart_attr{ struct smart_attr {
u8 attr_id; u8 attr_id;
u16 flags; u16 flags;
u8 cur; u8 cur;
u8 worst; u8 worst;
u32 data; u32 data;
u8 res[3]; u8 res[3];
}; } __packed;
/* Register Frame Information Structure (FIS), host to device. */ /* Register Frame Information Structure (FIS), host to device. */
struct host_to_dev_fis { struct host_to_dev_fis {

View File

@ -33,7 +33,7 @@
* detection. The mods to Rev F required more family * detection. The mods to Rev F required more family
* information detection. * information detection.
* *
* Changes/Fixes by Borislav Petkov <borislav.petkov@amd.com>: * Changes/Fixes by Borislav Petkov <bp@alien8.de>:
* - misc fixes and code cleanups * - misc fixes and code cleanups
* *
* This module is based on the following documents * This module is based on the following documents

View File

@ -5,7 +5,7 @@
* *
* 2007 (c) MontaVista Software, Inc. * 2007 (c) MontaVista Software, Inc.
* 2010 (c) Advanced Micro Devices Inc. * 2010 (c) Advanced Micro Devices Inc.
* Borislav Petkov <borislav.petkov@amd.com> * Borislav Petkov <bp@alien8.de>
* *
* This file is licensed under the terms of the GNU General Public * This file is licensed under the terms of the GNU General Public
* License version 2. This program is licensed "as is" without any * License version 2. This program is licensed "as is" without any

View File

@ -6,7 +6,7 @@
* This file may be distributed under the terms of the GNU General Public * This file may be distributed under the terms of the GNU General Public
* License version 2. * License version 2.
* *
* Copyright (c) 2010: Borislav Petkov <borislav.petkov@amd.com> * Copyright (c) 2010: Borislav Petkov <bp@alien8.de>
* Advanced Micro Devices Inc. * Advanced Micro Devices Inc.
*/ */
@ -168,6 +168,6 @@ module_init(edac_init_mce_inject);
module_exit(edac_exit_mce_inject); module_exit(edac_exit_mce_inject);
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
MODULE_AUTHOR("Borislav Petkov <borislav.petkov@amd.com>"); MODULE_AUTHOR("Borislav Petkov <bp@alien8.de>");
MODULE_AUTHOR("AMD Inc."); MODULE_AUTHOR("AMD Inc.");
MODULE_DESCRIPTION("MCE injection facility for testing MCE decoding"); MODULE_DESCRIPTION("MCE injection facility for testing MCE decoding");

View File

@ -1546,6 +1546,8 @@ static int sbp2_scsi_slave_configure(struct scsi_device *sdev)
struct sbp2_logical_unit *lu = sdev->hostdata; struct sbp2_logical_unit *lu = sdev->hostdata;
sdev->use_10_for_rw = 1; sdev->use_10_for_rw = 1;
sdev->no_report_opcodes = 1;
sdev->no_write_same = 1;
if (sbp2_param_exclusive_login) if (sbp2_param_exclusive_login)
sdev->manage_start_stop = 1; sdev->manage_start_stop = 1;

View File

@ -466,7 +466,7 @@ config GPIO_ADP5588_IRQ
config GPIO_ADNP config GPIO_ADNP
tristate "Avionic Design N-bit GPIO expander" tristate "Avionic Design N-bit GPIO expander"
depends on I2C && OF depends on I2C && OF_GPIO
help help
This option enables support for N GPIOs found on Avionic Design This option enables support for N GPIOs found on Avionic Design
I2C GPIO expanders. The register space will be extended by powers I2C GPIO expanders. The register space will be extended by powers

View File

@ -77,7 +77,7 @@ struct mcp23s08_driver_data {
/*----------------------------------------------------------------------*/ /*----------------------------------------------------------------------*/
#ifdef CONFIG_I2C #if IS_ENABLED(CONFIG_I2C)
static int mcp23008_read(struct mcp23s08 *mcp, unsigned reg) static int mcp23008_read(struct mcp23s08 *mcp, unsigned reg)
{ {
@ -399,7 +399,7 @@ static int mcp23s08_probe_one(struct mcp23s08 *mcp, struct device *dev,
break; break;
#endif /* CONFIG_SPI_MASTER */ #endif /* CONFIG_SPI_MASTER */
#ifdef CONFIG_I2C #if IS_ENABLED(CONFIG_I2C)
case MCP_TYPE_008: case MCP_TYPE_008:
mcp->ops = &mcp23008_ops; mcp->ops = &mcp23008_ops;
mcp->chip.ngpio = 8; mcp->chip.ngpio = 8;
@ -473,7 +473,7 @@ fail:
/*----------------------------------------------------------------------*/ /*----------------------------------------------------------------------*/
#ifdef CONFIG_I2C #if IS_ENABLED(CONFIG_I2C)
static int __devinit mcp230xx_probe(struct i2c_client *client, static int __devinit mcp230xx_probe(struct i2c_client *client,
const struct i2c_device_id *id) const struct i2c_device_id *id)

View File

@ -92,6 +92,11 @@ static inline void __iomem *mvebu_gpioreg_out(struct mvebu_gpio_chip *mvchip)
return mvchip->membase + GPIO_OUT_OFF; return mvchip->membase + GPIO_OUT_OFF;
} }
static inline void __iomem *mvebu_gpioreg_blink(struct mvebu_gpio_chip *mvchip)
{
return mvchip->membase + GPIO_BLINK_EN_OFF;
}
static inline void __iomem *mvebu_gpioreg_io_conf(struct mvebu_gpio_chip *mvchip) static inline void __iomem *mvebu_gpioreg_io_conf(struct mvebu_gpio_chip *mvchip)
{ {
return mvchip->membase + GPIO_IO_CONF_OFF; return mvchip->membase + GPIO_IO_CONF_OFF;
@ -206,6 +211,23 @@ static int mvebu_gpio_get(struct gpio_chip *chip, unsigned pin)
return (u >> pin) & 1; return (u >> pin) & 1;
} }
static void mvebu_gpio_blink(struct gpio_chip *chip, unsigned pin, int value)
{
struct mvebu_gpio_chip *mvchip =
container_of(chip, struct mvebu_gpio_chip, chip);
unsigned long flags;
u32 u;
spin_lock_irqsave(&mvchip->lock, flags);
u = readl_relaxed(mvebu_gpioreg_blink(mvchip));
if (value)
u |= 1 << pin;
else
u &= ~(1 << pin);
writel_relaxed(u, mvebu_gpioreg_blink(mvchip));
spin_unlock_irqrestore(&mvchip->lock, flags);
}
static int mvebu_gpio_direction_input(struct gpio_chip *chip, unsigned pin) static int mvebu_gpio_direction_input(struct gpio_chip *chip, unsigned pin)
{ {
struct mvebu_gpio_chip *mvchip = struct mvebu_gpio_chip *mvchip =
@ -244,6 +266,7 @@ static int mvebu_gpio_direction_output(struct gpio_chip *chip, unsigned pin,
if (ret) if (ret)
return ret; return ret;
mvebu_gpio_blink(chip, pin, 0);
mvebu_gpio_set(chip, pin, value); mvebu_gpio_set(chip, pin, value);
spin_lock_irqsave(&mvchip->lock, flags); spin_lock_irqsave(&mvchip->lock, flags);

View File

@ -49,13 +49,7 @@ nv50_disp_intr_vblank(struct nv50_disp_priv *priv, int crtc)
if (chan->vblank.crtc != crtc) if (chan->vblank.crtc != crtc)
continue; continue;
if (nv_device(priv)->chipset == 0x50) { if (nv_device(priv)->chipset >= 0xc0) {
nv_wr32(priv, 0x001704, chan->vblank.channel);
nv_wr32(priv, 0x001710, 0x80000000 | chan->vblank.ctxdma);
bar->flush(bar);
nv_wr32(priv, 0x001570, chan->vblank.offset);
nv_wr32(priv, 0x001574, chan->vblank.value);
} else {
nv_wr32(priv, 0x001718, 0x80000000 | chan->vblank.channel); nv_wr32(priv, 0x001718, 0x80000000 | chan->vblank.channel);
bar->flush(bar); bar->flush(bar);
nv_wr32(priv, 0x06000c, nv_wr32(priv, 0x06000c,
@ -63,6 +57,17 @@ nv50_disp_intr_vblank(struct nv50_disp_priv *priv, int crtc)
nv_wr32(priv, 0x060010, nv_wr32(priv, 0x060010,
lower_32_bits(chan->vblank.offset)); lower_32_bits(chan->vblank.offset));
nv_wr32(priv, 0x060014, chan->vblank.value); nv_wr32(priv, 0x060014, chan->vblank.value);
} else {
nv_wr32(priv, 0x001704, chan->vblank.channel);
nv_wr32(priv, 0x001710, 0x80000000 | chan->vblank.ctxdma);
bar->flush(bar);
if (nv_device(priv)->chipset == 0x50) {
nv_wr32(priv, 0x001570, chan->vblank.offset);
nv_wr32(priv, 0x001574, chan->vblank.value);
} else {
nv_wr32(priv, 0x060010, chan->vblank.offset);
nv_wr32(priv, 0x060014, chan->vblank.value);
}
} }
list_del(&chan->vblank.head); list_del(&chan->vblank.head);

View File

@ -669,21 +669,27 @@ nv40_grctx_fill(struct nouveau_device *device, struct nouveau_gpuobj *mem)
}); });
} }
void int
nv40_grctx_init(struct nouveau_device *device, u32 *size) nv40_grctx_init(struct nouveau_device *device, u32 *size)
{ {
u32 ctxprog[256], i; u32 *ctxprog = kmalloc(256 * 4, GFP_KERNEL), i;
struct nouveau_grctx ctx = { struct nouveau_grctx ctx = {
.device = device, .device = device,
.mode = NOUVEAU_GRCTX_PROG, .mode = NOUVEAU_GRCTX_PROG,
.data = ctxprog, .data = ctxprog,
.ctxprog_max = ARRAY_SIZE(ctxprog) .ctxprog_max = 256,
}; };
if (!ctxprog)
return -ENOMEM;
nv40_grctx_generate(&ctx); nv40_grctx_generate(&ctx);
nv_wr32(device, 0x400324, 0); nv_wr32(device, 0x400324, 0);
for (i = 0; i < ctx.ctxprog_len; i++) for (i = 0; i < ctx.ctxprog_len; i++)
nv_wr32(device, 0x400328, ctxprog[i]); nv_wr32(device, 0x400328, ctxprog[i]);
*size = ctx.ctxvals_pos * 4; *size = ctx.ctxvals_pos * 4;
kfree(ctxprog);
return 0;
} }

View File

@ -346,7 +346,9 @@ nv40_graph_init(struct nouveau_object *object)
return ret; return ret;
/* generate and upload context program */ /* generate and upload context program */
nv40_grctx_init(nv_device(priv), &priv->size); ret = nv40_grctx_init(nv_device(priv), &priv->size);
if (ret)
return ret;
/* No context present currently */ /* No context present currently */
nv_wr32(priv, NV40_PGRAPH_CTXCTL_CUR, 0x00000000); nv_wr32(priv, NV40_PGRAPH_CTXCTL_CUR, 0x00000000);

View File

@ -15,7 +15,7 @@ nv44_graph_class(void *priv)
return !(0x0baf & (1 << (device->chipset & 0x0f))); return !(0x0baf & (1 << (device->chipset & 0x0f)));
} }
void nv40_grctx_init(struct nouveau_device *, u32 *size); int nv40_grctx_init(struct nouveau_device *, u32 *size);
void nv40_grctx_fill(struct nouveau_device *, struct nouveau_gpuobj *); void nv40_grctx_fill(struct nouveau_device *, struct nouveau_gpuobj *);
#endif #endif

View File

@ -175,14 +175,18 @@ nv_mo32(void *obj, u32 addr, u32 mask, u32 data)
return temp; return temp;
} }
static inline bool static inline int
nv_strncmp(void *obj, u32 addr, u32 len, const char *str) nv_memcmp(void *obj, u32 addr, const char *str, u32 len)
{ {
unsigned char c1, c2;
while (len--) { while (len--) {
if (nv_ro08(obj, addr++) != *(str++)) c1 = nv_ro08(obj, addr++);
return false; c2 = *(str++);
if (c1 != c2)
return c1 - c2;
} }
return true; return 0;
} }
#endif #endif

View File

@ -54,6 +54,7 @@ int nv04_clock_pll_calc(struct nouveau_clock *, struct nvbios_pll *,
int clk, struct nouveau_pll_vals *); int clk, struct nouveau_pll_vals *);
int nv04_clock_pll_prog(struct nouveau_clock *, u32 reg1, int nv04_clock_pll_prog(struct nouveau_clock *, u32 reg1,
struct nouveau_pll_vals *); struct nouveau_pll_vals *);
int nva3_clock_pll_calc(struct nouveau_clock *, struct nvbios_pll *,
int clk, struct nouveau_pll_vals *);
#endif #endif

View File

@ -64,7 +64,7 @@ dcb_table(struct nouveau_bios *bios, u8 *ver, u8 *hdr, u8 *cnt, u8 *len)
} }
} else } else
if (*ver >= 0x15) { if (*ver >= 0x15) {
if (!nv_strncmp(bios, dcb - 7, 7, "DEV_REC")) { if (!nv_memcmp(bios, dcb - 7, "DEV_REC", 7)) {
u16 i2c = nv_ro16(bios, dcb + 2); u16 i2c = nv_ro16(bios, dcb + 2);
*hdr = 4; *hdr = 4;
*cnt = (i2c - dcb) / 10; *cnt = (i2c - dcb) / 10;

View File

@ -66,6 +66,24 @@ nva3_clock_pll_set(struct nouveau_clock *clk, u32 type, u32 freq)
return ret; return ret;
} }
int
nva3_clock_pll_calc(struct nouveau_clock *clock, struct nvbios_pll *info,
int clk, struct nouveau_pll_vals *pv)
{
int ret, N, M, P;
ret = nva3_pll_calc(clock, info, clk, &N, NULL, &M, &P);
if (ret > 0) {
pv->refclk = info->refclk;
pv->N1 = N;
pv->M1 = M;
pv->log2P = P;
}
return ret;
}
static int static int
nva3_clock_ctor(struct nouveau_object *parent, struct nouveau_object *engine, nva3_clock_ctor(struct nouveau_object *parent, struct nouveau_object *engine,
struct nouveau_oclass *oclass, void *data, u32 size, struct nouveau_oclass *oclass, void *data, u32 size,
@ -80,6 +98,7 @@ nva3_clock_ctor(struct nouveau_object *parent, struct nouveau_object *engine,
return ret; return ret;
priv->base.pll_set = nva3_clock_pll_set; priv->base.pll_set = nva3_clock_pll_set;
priv->base.pll_calc = nva3_clock_pll_calc;
return 0; return 0;
} }

View File

@ -79,6 +79,7 @@ nvc0_clock_ctor(struct nouveau_object *parent, struct nouveau_object *engine,
return ret; return ret;
priv->base.pll_set = nvc0_clock_pll_set; priv->base.pll_set = nvc0_clock_pll_set;
priv->base.pll_calc = nva3_clock_pll_calc;
return 0; return 0;
} }

View File

@ -241,6 +241,10 @@ nouveau_abi16_ioctl_channel_alloc(ABI16_IOCTL_ARGS)
if (unlikely(!abi16)) if (unlikely(!abi16))
return -ENOMEM; return -ENOMEM;
if (!drm->channel)
return nouveau_abi16_put(abi16, -ENODEV);
client = nv_client(abi16->client); client = nv_client(abi16->client);
if (init->fb_ctxdma_handle == ~0 || init->tt_ctxdma_handle == ~0) if (init->fb_ctxdma_handle == ~0 || init->tt_ctxdma_handle == ~0)

View File

@ -129,7 +129,8 @@ nouveau_accel_init(struct nouveau_drm *drm)
/* initialise synchronisation routines */ /* initialise synchronisation routines */
if (device->card_type < NV_10) ret = nv04_fence_create(drm); if (device->card_type < NV_10) ret = nv04_fence_create(drm);
else if (device->chipset < 0x84) ret = nv10_fence_create(drm); else if (device->card_type < NV_50) ret = nv10_fence_create(drm);
else if (device->chipset < 0x84) ret = nv50_fence_create(drm);
else if (device->card_type < NV_C0) ret = nv84_fence_create(drm); else if (device->card_type < NV_C0) ret = nv84_fence_create(drm);
else ret = nvc0_fence_create(drm); else ret = nvc0_fence_create(drm);
if (ret) { if (ret) {

View File

@ -1330,6 +1330,8 @@ void evergreen_mc_stop(struct radeon_device *rdev, struct evergreen_mc_save *sav
break; break;
udelay(1); udelay(1);
} }
} else {
save->crtc_enabled[i] = false;
} }
} }

View File

@ -69,9 +69,12 @@ static struct radeon_agpmode_quirk radeon_agpmode_quirk_list[] = {
/* Intel 82830 830 Chipset Host Bridge / Mobility M6 LY Needs AGPMode 2 (fdo #17360)*/ /* Intel 82830 830 Chipset Host Bridge / Mobility M6 LY Needs AGPMode 2 (fdo #17360)*/
{ PCI_VENDOR_ID_INTEL, 0x3575, PCI_VENDOR_ID_ATI, 0x4c59, { PCI_VENDOR_ID_INTEL, 0x3575, PCI_VENDOR_ID_ATI, 0x4c59,
PCI_VENDOR_ID_DELL, 0x00e3, 2}, PCI_VENDOR_ID_DELL, 0x00e3, 2},
/* Intel 82852/82855 host bridge / Mobility FireGL 9000 R250 Needs AGPMode 1 (lp #296617) */ /* Intel 82852/82855 host bridge / Mobility FireGL 9000 RV250 Needs AGPMode 1 (lp #296617) */
{ PCI_VENDOR_ID_INTEL, 0x3580, PCI_VENDOR_ID_ATI, 0x4c66, { PCI_VENDOR_ID_INTEL, 0x3580, PCI_VENDOR_ID_ATI, 0x4c66,
PCI_VENDOR_ID_DELL, 0x0149, 1}, PCI_VENDOR_ID_DELL, 0x0149, 1},
/* Intel 82855PM host bridge / Mobility FireGL 9000 RV250 Needs AGPMode 1 for suspend/resume */
{ PCI_VENDOR_ID_INTEL, 0x3340, PCI_VENDOR_ID_ATI, 0x4c66,
PCI_VENDOR_ID_IBM, 0x0531, 1},
/* Intel 82852/82855 host bridge / Mobility 9600 M10 RV350 Needs AGPMode 1 (deb #467460) */ /* Intel 82852/82855 host bridge / Mobility 9600 M10 RV350 Needs AGPMode 1 (deb #467460) */
{ PCI_VENDOR_ID_INTEL, 0x3580, PCI_VENDOR_ID_ATI, 0x4e50, { PCI_VENDOR_ID_INTEL, 0x3580, PCI_VENDOR_ID_ATI, 0x4e50,
0x1025, 0x0061, 1}, 0x1025, 0x0061, 1},

View File

@ -39,6 +39,7 @@
#define AT91_TWI_STOP 0x0002 /* Send a Stop Condition */ #define AT91_TWI_STOP 0x0002 /* Send a Stop Condition */
#define AT91_TWI_MSEN 0x0004 /* Master Transfer Enable */ #define AT91_TWI_MSEN 0x0004 /* Master Transfer Enable */
#define AT91_TWI_SVDIS 0x0020 /* Slave Transfer Disable */ #define AT91_TWI_SVDIS 0x0020 /* Slave Transfer Disable */
#define AT91_TWI_QUICK 0x0040 /* SMBus quick command */
#define AT91_TWI_SWRST 0x0080 /* Software Reset */ #define AT91_TWI_SWRST 0x0080 /* Software Reset */
#define AT91_TWI_MMR 0x0004 /* Master Mode Register */ #define AT91_TWI_MMR 0x0004 /* Master Mode Register */
@ -212,7 +213,11 @@ static int at91_do_twi_transfer(struct at91_twi_dev *dev)
INIT_COMPLETION(dev->cmd_complete); INIT_COMPLETION(dev->cmd_complete);
dev->transfer_status = 0; dev->transfer_status = 0;
if (dev->msg->flags & I2C_M_RD) {
if (!dev->buf_len) {
at91_twi_write(dev, AT91_TWI_CR, AT91_TWI_QUICK);
at91_twi_write(dev, AT91_TWI_IER, AT91_TWI_TXCOMP);
} else if (dev->msg->flags & I2C_M_RD) {
unsigned start_flags = AT91_TWI_START; unsigned start_flags = AT91_TWI_START;
if (at91_twi_read(dev, AT91_TWI_SR) & AT91_TWI_RXRDY) { if (at91_twi_read(dev, AT91_TWI_SR) & AT91_TWI_RXRDY) {

Some files were not shown because too many files have changed in this diff Show More