Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
42cbe827
Commit
42cbe827
authored
Nov 12, 2013
by
Russell King
Browse files
Options
Browse Files
Download
Plain Diff
Merge branches 'fixes', 'mmci' and 'sa11x0' into for-next
parents
df762ecc
6ecf830e
1ff44433
f3964fe1
Changes
16
Show whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
98 additions
and
106 deletions
+98
-106
arch/arm/Kconfig
arch/arm/Kconfig
+0
-1
arch/arm/configs/h3600_defconfig
arch/arm/configs/h3600_defconfig
+6
-16
arch/arm/kernel/entry-armv.S
arch/arm/kernel/entry-armv.S
+1
-0
arch/arm/kernel/signal.c
arch/arm/kernel/signal.c
+10
-4
arch/arm/mach-highbank/Kconfig
arch/arm/mach-highbank/Kconfig
+1
-1
arch/arm/mach-sa1100/assabet.c
arch/arm/mach-sa1100/assabet.c
+3
-0
arch/arm/mach-sa1100/include/mach/gpio.h
arch/arm/mach-sa1100/include/mach/gpio.h
+0
-55
arch/arm/mach-sa1100/include/mach/h3xxx.h
arch/arm/mach-sa1100/include/mach/h3xxx.h
+2
-0
arch/arm/mach-sa1100/simpad.c
arch/arm/mach-sa1100/simpad.c
+1
-0
arch/arm/mach-tegra/Kconfig
arch/arm/mach-tegra/Kconfig
+1
-1
arch/arm/mm/dma-mapping.c
arch/arm/mm/dma-mapping.c
+2
-2
arch/arm/mm/extable.c
arch/arm/mm/extable.c
+6
-1
arch/arm/vfp/vfpmodule.c
arch/arm/vfp/vfpmodule.c
+3
-3
drivers/gpio/gpio-sa1100.c
drivers/gpio/gpio-sa1100.c
+1
-1
drivers/mmc/host/mmci.c
drivers/mmc/host/mmci.c
+61
-17
drivers/mmc/host/mmci.h
drivers/mmc/host/mmci.h
+0
-4
No files found.
arch/arm/Kconfig
View file @
42cbe827
...
@@ -696,7 +696,6 @@ config ARCH_SA1100
...
@@ -696,7 +696,6 @@ config ARCH_SA1100
select GENERIC_CLOCKEVENTS
select GENERIC_CLOCKEVENTS
select HAVE_IDE
select HAVE_IDE
select ISA
select ISA
select NEED_MACH_GPIO_H
select NEED_MACH_MEMORY_H
select NEED_MACH_MEMORY_H
select SPARSE_IRQ
select SPARSE_IRQ
help
help
...
...
arch/arm/configs/h3600_defconfig
View file @
42cbe827
CONFIG_EXPERIMENTAL=y
CONFIG_SYSVIPC=y
CONFIG_SYSVIPC=y
CONFIG_NO_HZ_IDLE=y
CONFIG_HIGH_RES_TIMERS=y
CONFIG_LOG_BUF_SHIFT=14
CONFIG_LOG_BUF_SHIFT=14
CONFIG_BLK_DEV_INITRD=y
CONFIG_BLK_DEV_INITRD=y
CONFIG_MODULES=y
CONFIG_MODULES=y
...
@@ -11,11 +12,11 @@ CONFIG_ARCH_SA1100=y
...
@@ -11,11 +12,11 @@ CONFIG_ARCH_SA1100=y
CONFIG_SA1100_H3600=y
CONFIG_SA1100_H3600=y
CONFIG_PCCARD=y
CONFIG_PCCARD=y
CONFIG_PCMCIA_SA1100=y
CONFIG_PCMCIA_SA1100=y
CONFIG_PREEMPT=y
CONFIG_ZBOOT_ROM_TEXT=0x0
CONFIG_ZBOOT_ROM_TEXT=0x0
CONFIG_ZBOOT_ROM_BSS=0x0
CONFIG_ZBOOT_ROM_BSS=0x0
# CONFIG_CPU_FREQ_STAT is not set
# CONFIG_CPU_FREQ_STAT is not set
CONFIG_FPE_NWFPE=y
CONFIG_FPE_NWFPE=y
CONFIG_PM=y
CONFIG_NET=y
CONFIG_NET=y
CONFIG_UNIX=y
CONFIG_UNIX=y
CONFIG_INET=y
CONFIG_INET=y
...
@@ -24,13 +25,10 @@ CONFIG_IRDA=m
...
@@ -24,13 +25,10 @@ CONFIG_IRDA=m
CONFIG_IRLAN=m
CONFIG_IRLAN=m
CONFIG_IRNET=m
CONFIG_IRNET=m
CONFIG_IRCOMM=m
CONFIG_IRCOMM=m
CONFIG_SA1100_FIR=m
# CONFIG_WIRELESS is not set
# CONFIG_WIRELESS is not set
CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
CONFIG_MTD=y
CONFIG_MTD=y
CONFIG_MTD_PARTITIONS=y
CONFIG_MTD_REDBOOT_PARTS=y
CONFIG_MTD_REDBOOT_PARTS=y
CONFIG_MTD_CHAR=y
CONFIG_MTD_BLOCK=y
CONFIG_MTD_BLOCK=y
CONFIG_MTD_CFI=y
CONFIG_MTD_CFI=y
CONFIG_MTD_CFI_ADV_OPTIONS=y
CONFIG_MTD_CFI_ADV_OPTIONS=y
...
@@ -41,19 +39,15 @@ CONFIG_MTD_SA1100=y
...
@@ -41,19 +39,15 @@ CONFIG_MTD_SA1100=y
CONFIG_BLK_DEV_LOOP=m
CONFIG_BLK_DEV_LOOP=m
CONFIG_BLK_DEV_RAM=y
CONFIG_BLK_DEV_RAM=y
CONFIG_BLK_DEV_RAM_SIZE=8192
CONFIG_BLK_DEV_RAM_SIZE=8192
# CONFIG_MISC_DEVICES is not set
CONFIG_IDE=y
CONFIG_IDE=y
CONFIG_BLK_DEV_IDECS=y
CONFIG_BLK_DEV_IDECS=y
CONFIG_NETDEVICES=y
CONFIG_NETDEVICES=y
# CONFIG_NETDEV_1000 is not set
# CONFIG_NETDEV_10000 is not set
# CONFIG_WLAN is not set
CONFIG_NET_PCMCIA=y
CONFIG_PCMCIA_PCNET=y
CONFIG_PCMCIA_PCNET=y
CONFIG_PPP=m
CONFIG_PPP=m
CONFIG_PPP_ASYNC=m
CONFIG_PPP_DEFLATE=m
CONFIG_PPP_BSDCOMP=m
CONFIG_PPP_BSDCOMP=m
CONFIG_PPP_DEFLATE=m
CONFIG_PPP_ASYNC=m
# CONFIG_WLAN is not set
# CONFIG_KEYBOARD_ATKBD is not set
# CONFIG_KEYBOARD_ATKBD is not set
CONFIG_KEYBOARD_GPIO=y
CONFIG_KEYBOARD_GPIO=y
# CONFIG_INPUT_MOUSE is not set
# CONFIG_INPUT_MOUSE is not set
...
@@ -64,8 +58,6 @@ CONFIG_SERIAL_SA1100_CONSOLE=y
...
@@ -64,8 +58,6 @@ CONFIG_SERIAL_SA1100_CONSOLE=y
# CONFIG_HWMON is not set
# CONFIG_HWMON is not set
CONFIG_FB=y
CONFIG_FB=y
CONFIG_FB_SA1100=y
CONFIG_FB_SA1100=y
# CONFIG_VGA_CONSOLE is not set
# CONFIG_HID_SUPPORT is not set
# CONFIG_USB_SUPPORT is not set
# CONFIG_USB_SUPPORT is not set
CONFIG_EXT2_FS=y
CONFIG_EXT2_FS=y
CONFIG_MSDOS_FS=m
CONFIG_MSDOS_FS=m
...
@@ -74,6 +66,4 @@ CONFIG_JFFS2_FS=y
...
@@ -74,6 +66,4 @@ CONFIG_JFFS2_FS=y
CONFIG_CRAMFS=m
CONFIG_CRAMFS=m
CONFIG_NFS_FS=y
CONFIG_NFS_FS=y
CONFIG_NFSD=m
CONFIG_NFSD=m
CONFIG_SMB_FS=m
CONFIG_NLS=y
CONFIG_NLS=y
# CONFIG_RCU_CPU_STALL_DETECTOR is not set
arch/arm/kernel/entry-armv.S
View file @
42cbe827
...
@@ -192,6 +192,7 @@ __dabt_svc:
...
@@ -192,6 +192,7 @@ __dabt_svc:
svc_entry
svc_entry
mov
r2
,
sp
mov
r2
,
sp
dabt_helper
dabt_helper
THUMB
(
ldr
r5
,
[
sp
,
#
S_PSR
]
)
@
potentially
updated
CPSR
svc_exit
r5
@
return
from
exception
svc_exit
r5
@
return
from
exception
UNWIND
(.
fnend
)
UNWIND
(.
fnend
)
ENDPROC
(
__dabt_svc
)
ENDPROC
(
__dabt_svc
)
...
...
arch/arm/kernel/signal.c
View file @
42cbe827
...
@@ -353,12 +353,18 @@ setup_return(struct pt_regs *regs, struct ksignal *ksig,
...
@@ -353,12 +353,18 @@ setup_return(struct pt_regs *regs, struct ksignal *ksig,
*/
*/
thumb
=
handler
&
1
;
thumb
=
handler
&
1
;
if
(
thumb
)
{
cpsr
|=
PSR_T_BIT
;
#if __LINUX_ARM_ARCH__ >= 7
#if __LINUX_ARM_ARCH__ >= 7
/* clear the If-Then Thumb-2 execution state */
/*
* Clear the If-Then Thumb-2 execution state
* ARM spec requires this to be all 000s in ARM mode
* Snapdragon S4/Krait misbehaves on a Thumb=>ARM
* signal transition without this.
*/
cpsr
&=
~
PSR_IT_MASK
;
cpsr
&=
~
PSR_IT_MASK
;
#endif
#endif
if
(
thumb
)
{
cpsr
|=
PSR_T_BIT
;
}
else
}
else
cpsr
&=
~
PSR_T_BIT
;
cpsr
&=
~
PSR_T_BIT
;
}
}
...
...
arch/arm/mach-highbank/Kconfig
View file @
42cbe827
...
@@ -9,7 +9,7 @@ config ARCH_HIGHBANK
...
@@ -9,7 +9,7 @@ config ARCH_HIGHBANK
select ARM_AMBA
select ARM_AMBA
select ARM_ERRATA_764369
select ARM_ERRATA_764369
select ARM_ERRATA_775420
select ARM_ERRATA_775420
select ARM_ERRATA_798181
select ARM_ERRATA_798181
if SMP
select ARM_GIC
select ARM_GIC
select ARM_TIMER_SP804
select ARM_TIMER_SP804
select CACHE_L2X0
select CACHE_L2X0
...
...
arch/arm/mach-sa1100/assabet.c
View file @
42cbe827
...
@@ -512,6 +512,9 @@ static void __init assabet_map_io(void)
...
@@ -512,6 +512,9 @@ static void __init assabet_map_io(void)
* Its called GPCLKR0 in my SA1110 manual.
* Its called GPCLKR0 in my SA1110 manual.
*/
*/
Ser1SDCR0
|=
SDCR0_SUS
;
Ser1SDCR0
|=
SDCR0_SUS
;
MSC1
=
(
MSC1
&
~
0xffff
)
|
MSC_NonBrst
|
MSC_32BitStMem
|
MSC_RdAcc
(
2
)
|
MSC_WrAcc
(
2
)
|
MSC_Rec
(
0
);
if
(
!
machine_has_neponset
())
if
(
!
machine_has_neponset
())
sa1100_register_uart_fns
(
&
assabet_port_fns
);
sa1100_register_uart_fns
(
&
assabet_port_fns
);
...
...
arch/arm/mach-sa1100/include/mach/gpio.h
deleted
100644 → 0
View file @
df762ecc
/*
* arch/arm/mach-sa1100/include/mach/gpio.h
*
* SA1100 GPIO wrappers for arch-neutral GPIO calls
*
* Written by Philipp Zabel <philipp.zabel@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*/
#ifndef __ASM_ARCH_SA1100_GPIO_H
#define __ASM_ARCH_SA1100_GPIO_H
#include <linux/io.h>
#include <mach/hardware.h>
#include <asm/irq.h>
#include <asm-generic/gpio.h>
#define __ARM_GPIOLIB_COMPLEX
static
inline
int
gpio_get_value
(
unsigned
gpio
)
{
if
(
__builtin_constant_p
(
gpio
)
&&
(
gpio
<=
GPIO_MAX
))
return
GPLR
&
GPIO_GPIO
(
gpio
);
else
return
__gpio_get_value
(
gpio
);
}
static
inline
void
gpio_set_value
(
unsigned
gpio
,
int
value
)
{
if
(
__builtin_constant_p
(
gpio
)
&&
(
gpio
<=
GPIO_MAX
))
if
(
value
)
GPSR
=
GPIO_GPIO
(
gpio
);
else
GPCR
=
GPIO_GPIO
(
gpio
);
else
__gpio_set_value
(
gpio
,
value
);
}
#define gpio_cansleep __gpio_cansleep
#endif
arch/arm/mach-sa1100/include/mach/h3xxx.h
View file @
42cbe827
...
@@ -13,6 +13,8 @@
...
@@ -13,6 +13,8 @@
#ifndef _INCLUDE_H3XXX_H_
#ifndef _INCLUDE_H3XXX_H_
#define _INCLUDE_H3XXX_H_
#define _INCLUDE_H3XXX_H_
#include "hardware.h"
/* Gives GPIO_MAX */
/* Physical memory regions corresponding to chip selects */
/* Physical memory regions corresponding to chip selects */
#define H3600_EGPIO_PHYS (SA1100_CS5_PHYS + 0x01000000)
#define H3600_EGPIO_PHYS (SA1100_CS5_PHYS + 0x01000000)
#define H3600_BANK_2_PHYS SA1100_CS2_PHYS
#define H3600_BANK_2_PHYS SA1100_CS2_PHYS
...
...
arch/arm/mach-sa1100/simpad.c
View file @
42cbe827
...
@@ -19,6 +19,7 @@
...
@@ -19,6 +19,7 @@
#include <mach/hardware.h>
#include <mach/hardware.h>
#include <asm/setup.h>
#include <asm/setup.h>
#include <asm/irq.h>
#include <asm/mach-types.h>
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
#include <asm/mach/arch.h>
...
...
arch/arm/mach-tegra/Kconfig
View file @
42cbe827
...
@@ -54,7 +54,7 @@ config ARCH_TEGRA_3x_SOC
...
@@ -54,7 +54,7 @@ config ARCH_TEGRA_3x_SOC
config ARCH_TEGRA_114_SOC
config ARCH_TEGRA_114_SOC
bool "Enable support for Tegra114 family"
bool "Enable support for Tegra114 family"
select HAVE_ARM_ARCH_TIMER
select HAVE_ARM_ARCH_TIMER
select ARM_ERRATA_798181
select ARM_ERRATA_798181
if SMP
select ARM_L1_CACHE_SHIFT_6
select ARM_L1_CACHE_SHIFT_6
select PINCTRL_TEGRA114
select PINCTRL_TEGRA114
help
help
...
...
arch/arm/mm/dma-mapping.c
View file @
42cbe827
...
@@ -687,7 +687,7 @@ static void *__dma_alloc(struct device *dev, size_t size, dma_addr_t *handle,
...
@@ -687,7 +687,7 @@ static void *__dma_alloc(struct device *dev, size_t size, dma_addr_t *handle,
void
*
arm_dma_alloc
(
struct
device
*
dev
,
size_t
size
,
dma_addr_t
*
handle
,
void
*
arm_dma_alloc
(
struct
device
*
dev
,
size_t
size
,
dma_addr_t
*
handle
,
gfp_t
gfp
,
struct
dma_attrs
*
attrs
)
gfp_t
gfp
,
struct
dma_attrs
*
attrs
)
{
{
pgprot_t
prot
=
__get_dma_pgprot
(
attrs
,
pgprot_kernel
);
pgprot_t
prot
=
__get_dma_pgprot
(
attrs
,
PAGE_KERNEL
);
void
*
memory
;
void
*
memory
;
if
(
dma_alloc_from_coherent
(
dev
,
size
,
handle
,
&
memory
))
if
(
dma_alloc_from_coherent
(
dev
,
size
,
handle
,
&
memory
))
...
@@ -700,7 +700,7 @@ void *arm_dma_alloc(struct device *dev, size_t size, dma_addr_t *handle,
...
@@ -700,7 +700,7 @@ void *arm_dma_alloc(struct device *dev, size_t size, dma_addr_t *handle,
static
void
*
arm_coherent_dma_alloc
(
struct
device
*
dev
,
size_t
size
,
static
void
*
arm_coherent_dma_alloc
(
struct
device
*
dev
,
size_t
size
,
dma_addr_t
*
handle
,
gfp_t
gfp
,
struct
dma_attrs
*
attrs
)
dma_addr_t
*
handle
,
gfp_t
gfp
,
struct
dma_attrs
*
attrs
)
{
{
pgprot_t
prot
=
__get_dma_pgprot
(
attrs
,
pgprot_kernel
);
pgprot_t
prot
=
__get_dma_pgprot
(
attrs
,
PAGE_KERNEL
);
void
*
memory
;
void
*
memory
;
if
(
dma_alloc_from_coherent
(
dev
,
size
,
handle
,
&
memory
))
if
(
dma_alloc_from_coherent
(
dev
,
size
,
handle
,
&
memory
))
...
...
arch/arm/mm/extable.c
View file @
42cbe827
...
@@ -9,8 +9,13 @@ int fixup_exception(struct pt_regs *regs)
...
@@ -9,8 +9,13 @@ int fixup_exception(struct pt_regs *regs)
const
struct
exception_table_entry
*
fixup
;
const
struct
exception_table_entry
*
fixup
;
fixup
=
search_exception_tables
(
instruction_pointer
(
regs
));
fixup
=
search_exception_tables
(
instruction_pointer
(
regs
));
if
(
fixup
)
if
(
fixup
)
{
regs
->
ARM_pc
=
fixup
->
fixup
;
regs
->
ARM_pc
=
fixup
->
fixup
;
#ifdef CONFIG_THUMB2_KERNEL
/* Clear the IT state to avoid nasty surprises in the fixup */
regs
->
ARM_cpsr
&=
~
PSR_IT_MASK
;
#endif
}
return
fixup
!=
NULL
;
return
fixup
!=
NULL
;
}
}
arch/arm/vfp/vfpmodule.c
View file @
42cbe827
...
@@ -642,9 +642,9 @@ int vfp_restore_user_hwstate(struct user_vfp __user *ufp,
...
@@ -642,9 +642,9 @@ int vfp_restore_user_hwstate(struct user_vfp __user *ufp,
static
int
vfp_hotplug
(
struct
notifier_block
*
b
,
unsigned
long
action
,
static
int
vfp_hotplug
(
struct
notifier_block
*
b
,
unsigned
long
action
,
void
*
hcpu
)
void
*
hcpu
)
{
{
if
(
action
==
CPU_DYING
||
action
==
CPU_DYING_FROZEN
)
{
if
(
action
==
CPU_DYING
||
action
==
CPU_DYING_FROZEN
)
vfp_
force_reload
((
long
)
hcpu
,
current_thread_info
())
;
vfp_
current_hw_state
[(
long
)
hcpu
]
=
NULL
;
}
else
if
(
action
==
CPU_STARTING
||
action
==
CPU_STARTING_FROZEN
)
else
if
(
action
==
CPU_STARTING
||
action
==
CPU_STARTING_FROZEN
)
vfp_enable
(
NULL
);
vfp_enable
(
NULL
);
return
NOTIFY_OK
;
return
NOTIFY_OK
;
}
}
...
...
drivers/gpio/gpio-sa1100.c
View file @
42cbe827
...
@@ -10,7 +10,7 @@
...
@@ -10,7 +10,7 @@
#include <linux/gpio.h>
#include <linux/gpio.h>
#include <linux/init.h>
#include <linux/init.h>
#include <linux/module.h>
#include <linux/module.h>
#include <linux/io.h>
#include <mach/hardware.h>
#include <mach/hardware.h>
#include <mach/irqs.h>
#include <mach/irqs.h>
...
...
drivers/mmc/host/mmci.c
View file @
42cbe827
...
@@ -62,6 +62,7 @@ static unsigned int fmax = 515633;
...
@@ -62,6 +62,7 @@ static unsigned int fmax = 515633;
* @signal_direction: input/out direction of bus signals can be indicated
* @signal_direction: input/out direction of bus signals can be indicated
* @pwrreg_clkgate: MMCIPOWER register must be used to gate the clock
* @pwrreg_clkgate: MMCIPOWER register must be used to gate the clock
* @busy_detect: true if busy detection on dat0 is supported
* @busy_detect: true if busy detection on dat0 is supported
* @pwrreg_nopower: bits in MMCIPOWER don't controls ext. power supply
*/
*/
struct
variant_data
{
struct
variant_data
{
unsigned
int
clkreg
;
unsigned
int
clkreg
;
...
@@ -76,6 +77,7 @@ struct variant_data {
...
@@ -76,6 +77,7 @@ struct variant_data {
bool
signal_direction
;
bool
signal_direction
;
bool
pwrreg_clkgate
;
bool
pwrreg_clkgate
;
bool
busy_detect
;
bool
busy_detect
;
bool
pwrreg_nopower
;
};
};
static
struct
variant_data
variant_arm
=
{
static
struct
variant_data
variant_arm
=
{
...
@@ -109,6 +111,7 @@ static struct variant_data variant_u300 = {
...
@@ -109,6 +111,7 @@ static struct variant_data variant_u300 = {
.
pwrreg_powerup
=
MCI_PWR_ON
,
.
pwrreg_powerup
=
MCI_PWR_ON
,
.
signal_direction
=
true
,
.
signal_direction
=
true
,
.
pwrreg_clkgate
=
true
,
.
pwrreg_clkgate
=
true
,
.
pwrreg_nopower
=
true
,
};
};
static
struct
variant_data
variant_nomadik
=
{
static
struct
variant_data
variant_nomadik
=
{
...
@@ -121,6 +124,7 @@ static struct variant_data variant_nomadik = {
...
@@ -121,6 +124,7 @@ static struct variant_data variant_nomadik = {
.
pwrreg_powerup
=
MCI_PWR_ON
,
.
pwrreg_powerup
=
MCI_PWR_ON
,
.
signal_direction
=
true
,
.
signal_direction
=
true
,
.
pwrreg_clkgate
=
true
,
.
pwrreg_clkgate
=
true
,
.
pwrreg_nopower
=
true
,
};
};
static
struct
variant_data
variant_ux500
=
{
static
struct
variant_data
variant_ux500
=
{
...
@@ -135,6 +139,7 @@ static struct variant_data variant_ux500 = {
...
@@ -135,6 +139,7 @@ static struct variant_data variant_ux500 = {
.
signal_direction
=
true
,
.
signal_direction
=
true
,
.
pwrreg_clkgate
=
true
,
.
pwrreg_clkgate
=
true
,
.
busy_detect
=
true
,
.
busy_detect
=
true
,
.
pwrreg_nopower
=
true
,
};
};
static
struct
variant_data
variant_ux500v2
=
{
static
struct
variant_data
variant_ux500v2
=
{
...
@@ -150,6 +155,7 @@ static struct variant_data variant_ux500v2 = {
...
@@ -150,6 +155,7 @@ static struct variant_data variant_ux500v2 = {
.
signal_direction
=
true
,
.
signal_direction
=
true
,
.
pwrreg_clkgate
=
true
,
.
pwrreg_clkgate
=
true
,
.
busy_detect
=
true
,
.
busy_detect
=
true
,
.
pwrreg_nopower
=
true
,
};
};
static
int
mmci_card_busy
(
struct
mmc_host
*
mmc
)
static
int
mmci_card_busy
(
struct
mmc_host
*
mmc
)
...
@@ -189,6 +195,21 @@ static int mmci_validate_data(struct mmci_host *host,
...
@@ -189,6 +195,21 @@ static int mmci_validate_data(struct mmci_host *host,
return
0
;
return
0
;
}
}
static
void
mmci_reg_delay
(
struct
mmci_host
*
host
)
{
/*
* According to the spec, at least three feedback clock cycles
* of max 52 MHz must pass between two writes to the MMCICLOCK reg.
* Three MCLK clock cycles must pass between two MMCIPOWER reg writes.
* Worst delay time during card init is at 100 kHz => 30 us.
* Worst delay time when up and running is at 25 MHz => 120 ns.
*/
if
(
host
->
cclk
<
25000000
)
udelay
(
30
);
else
ndelay
(
120
);
}
/*
/*
* This must be called with host->lock held
* This must be called with host->lock held
*/
*/
...
@@ -1264,6 +1285,7 @@ static void mmci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
...
@@ -1264,6 +1285,7 @@ static void mmci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
mmci_set_clkreg
(
host
,
ios
->
clock
);
mmci_set_clkreg
(
host
,
ios
->
clock
);
mmci_write_pwrreg
(
host
,
pwr
);
mmci_write_pwrreg
(
host
,
pwr
);
mmci_reg_delay
(
host
);
spin_unlock_irqrestore
(
&
host
->
lock
,
flags
);
spin_unlock_irqrestore
(
&
host
->
lock
,
flags
);
...
@@ -1510,23 +1532,6 @@ static int mmci_probe(struct amba_device *dev,
...
@@ -1510,23 +1532,6 @@ static int mmci_probe(struct amba_device *dev,
mmc
->
f_max
=
min
(
host
->
mclk
,
fmax
);
mmc
->
f_max
=
min
(
host
->
mclk
,
fmax
);
dev_dbg
(
mmc_dev
(
mmc
),
"clocking block at %u Hz
\n
"
,
mmc
->
f_max
);
dev_dbg
(
mmc_dev
(
mmc
),
"clocking block at %u Hz
\n
"
,
mmc
->
f_max
);
host
->
pinctrl
=
devm_pinctrl_get
(
&
dev
->
dev
);
if
(
IS_ERR
(
host
->
pinctrl
))
{
ret
=
PTR_ERR
(
host
->
pinctrl
);
goto
clk_disable
;
}
host
->
pins_default
=
pinctrl_lookup_state
(
host
->
pinctrl
,
PINCTRL_STATE_DEFAULT
);
/* enable pins to be muxed in and configured */
if
(
!
IS_ERR
(
host
->
pins_default
))
{
ret
=
pinctrl_select_state
(
host
->
pinctrl
,
host
->
pins_default
);
if
(
ret
)
dev_warn
(
&
dev
->
dev
,
"could not set default pins
\n
"
);
}
else
dev_warn
(
&
dev
->
dev
,
"could not get default pinstate
\n
"
);
/* Get regulators and the supported OCR mask */
/* Get regulators and the supported OCR mask */
mmc_regulator_get_supply
(
mmc
);
mmc_regulator_get_supply
(
mmc
);
if
(
!
mmc
->
ocr_avail
)
if
(
!
mmc
->
ocr_avail
)
...
@@ -1760,6 +1765,41 @@ static int mmci_resume(struct device *dev)
...
@@ -1760,6 +1765,41 @@ static int mmci_resume(struct device *dev)
#endif
#endif
#ifdef CONFIG_PM_RUNTIME
#ifdef CONFIG_PM_RUNTIME
static
void
mmci_save
(
struct
mmci_host
*
host
)
{
unsigned
long
flags
;
if
(
host
->
variant
->
pwrreg_nopower
)
{
spin_lock_irqsave
(
&
host
->
lock
,
flags
);
writel
(
0
,
host
->
base
+
MMCIMASK0
);
writel
(
0
,
host
->
base
+
MMCIDATACTRL
);
writel
(
0
,
host
->
base
+
MMCIPOWER
);
writel
(
0
,
host
->
base
+
MMCICLOCK
);
mmci_reg_delay
(
host
);
spin_unlock_irqrestore
(
&
host
->
lock
,
flags
);
}
}
static
void
mmci_restore
(
struct
mmci_host
*
host
)
{
unsigned
long
flags
;
if
(
host
->
variant
->
pwrreg_nopower
)
{
spin_lock_irqsave
(
&
host
->
lock
,
flags
);
writel
(
host
->
clk_reg
,
host
->
base
+
MMCICLOCK
);
writel
(
host
->
datactrl_reg
,
host
->
base
+
MMCIDATACTRL
);
writel
(
host
->
pwr_reg
,
host
->
base
+
MMCIPOWER
);
writel
(
MCI_IRQENABLE
,
host
->
base
+
MMCIMASK0
);
mmci_reg_delay
(
host
);
spin_unlock_irqrestore
(
&
host
->
lock
,
flags
);
}
}
static
int
mmci_runtime_suspend
(
struct
device
*
dev
)
static
int
mmci_runtime_suspend
(
struct
device
*
dev
)
{
{
struct
amba_device
*
adev
=
to_amba_device
(
dev
);
struct
amba_device
*
adev
=
to_amba_device
(
dev
);
...
@@ -1767,6 +1807,8 @@ static int mmci_runtime_suspend(struct device *dev)
...
@@ -1767,6 +1807,8 @@ static int mmci_runtime_suspend(struct device *dev)
if
(
mmc
)
{
if
(
mmc
)
{
struct
mmci_host
*
host
=
mmc_priv
(
mmc
);
struct
mmci_host
*
host
=
mmc_priv
(
mmc
);
pinctrl_pm_select_sleep_state
(
dev
);
mmci_save
(
host
);
clk_disable_unprepare
(
host
->
clk
);
clk_disable_unprepare
(
host
->
clk
);
}
}
...
@@ -1781,6 +1823,8 @@ static int mmci_runtime_resume(struct device *dev)
...
@@ -1781,6 +1823,8 @@ static int mmci_runtime_resume(struct device *dev)
if
(
mmc
)
{
if
(
mmc
)
{
struct
mmci_host
*
host
=
mmc_priv
(
mmc
);
struct
mmci_host
*
host
=
mmc_priv
(
mmc
);
clk_prepare_enable
(
host
->
clk
);
clk_prepare_enable
(
host
->
clk
);
mmci_restore
(
host
);
pinctrl_pm_select_default_state
(
dev
);
}
}
return
0
;
return
0
;
...
...
drivers/mmc/host/mmci.h
View file @
42cbe827
...
@@ -200,10 +200,6 @@ struct mmci_host {
...
@@ -200,10 +200,6 @@ struct mmci_host {
struct
sg_mapping_iter
sg_miter
;
struct
sg_mapping_iter
sg_miter
;
unsigned
int
size
;
unsigned
int
size
;
/* pinctrl handles */
struct
pinctrl
*
pinctrl
;
struct
pinctrl_state
*
pins_default
;
#ifdef CONFIG_DMA_ENGINE
#ifdef CONFIG_DMA_ENGINE
/* DMA stuff */
/* DMA stuff */
struct
dma_chan
*
dma_current
;
struct
dma_chan
*
dma_current
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment