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
nexedi
linux
Commits
7f3d1f98
Commit
7f3d1f98
authored
Nov 08, 2017
by
Russell King
Browse files
Options
Browse Files
Download
Plain Diff
Merge branches 'fixes', 'misc' and 'sa1111-for-next' into for-next
parents
b9dd05c7
2a14b80c
de854b33
Changes
14
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
89 additions
and
85 deletions
+89
-85
arch/arm/Kconfig
arch/arm/Kconfig
+1
-0
arch/arm/boot/compressed/Makefile
arch/arm/boot/compressed/Makefile
+5
-2
arch/arm/boot/compressed/head.S
arch/arm/boot/compressed/head.S
+2
-0
arch/arm/boot/compressed/vmlinux.lds.S
arch/arm/boot/compressed/vmlinux.lds.S
+11
-0
arch/arm/include/asm/dma-mapping.h
arch/arm/include/asm/dma-mapping.h
+0
-7
arch/arm/include/asm/highmem.h
arch/arm/include/asm/highmem.h
+0
-1
arch/arm/kernel/atags_parse.c
arch/arm/kernel/atags_parse.c
+2
-5
arch/arm/kernel/debug.S
arch/arm/kernel/debug.S
+25
-14
arch/arm/kernel/early_printk.c
arch/arm/kernel/early_printk.c
+10
-6
arch/arm/kernel/entry-common.S
arch/arm/kernel/entry-common.S
+0
-9
arch/arm/kernel/setup.c
arch/arm/kernel/setup.c
+10
-0
arch/arm/mm/dma-mapping.c
arch/arm/mm/dma-mapping.c
+3
-18
arch/arm/mm/init.c
arch/arm/mm/init.c
+0
-10
drivers/pcmcia/sa1111_generic.c
drivers/pcmcia/sa1111_generic.c
+20
-13
No files found.
arch/arm/Kconfig
View file @
7f3d1f98
...
@@ -2,6 +2,7 @@ config ARM
...
@@ -2,6 +2,7 @@ config ARM
bool
bool
default y
default y
select ARCH_CLOCKSOURCE_DATA
select ARCH_CLOCKSOURCE_DATA
select ARCH_DISCARD_MEMBLOCK if !HAVE_ARCH_PFN_VALID
select ARCH_HAS_DEBUG_VIRTUAL
select ARCH_HAS_DEBUG_VIRTUAL
select ARCH_HAS_DEVMEM_IS_ALLOWED
select ARCH_HAS_DEVMEM_IS_ALLOWED
select ARCH_HAS_ELF_RANDOMIZE
select ARCH_HAS_ELF_RANDOMIZE
...
...
arch/arm/boot/compressed/Makefile
View file @
7f3d1f98
...
@@ -116,8 +116,11 @@ ccflags-y := -fpic -mno-single-pic-base -fno-builtin -I$(obj)
...
@@ -116,8 +116,11 @@ ccflags-y := -fpic -mno-single-pic-base -fno-builtin -I$(obj)
asflags-y
:=
-DZIMAGE
asflags-y
:=
-DZIMAGE
# Supply kernel BSS size to the decompressor via a linker symbol.
# Supply kernel BSS size to the decompressor via a linker symbol.
KBSS_SZ
=
$(
shell
$(CROSS_COMPILE)
size
$(obj)
/../../../../vmlinux |
\
KBSS_SZ
=
$(
shell
$(CROSS_COMPILE)
nm
$(obj)
/../../../../vmlinux |
\
awk
'END{print $$3
}
'
)
perl
-e
'while (<>
)
{ \
$$bss_start=hex($$1
)
if /^([[:xdigit:]]+
)
B __bss_start$$/; \
$$bss_end=hex($$1
)
if /^([[:xdigit:]]+
)
B __bss_stop$$/; \
}
; printf "%d\n", $$bss_end - $$bss_start;'
)
LDFLAGS_vmlinux
=
--defsym
_kernel_bss_size
=
$(KBSS_SZ)
LDFLAGS_vmlinux
=
--defsym
_kernel_bss_size
=
$(KBSS_SZ)
# Supply ZRELADDR to the decompressor via a linker symbol.
# Supply ZRELADDR to the decompressor via a linker symbol.
ifneq
($(CONFIG_AUTO_ZRELADDR),y)
ifneq
($(CONFIG_AUTO_ZRELADDR),y)
...
...
arch/arm/boot/compressed/head.S
View file @
7f3d1f98
...
@@ -143,6 +143,8 @@ start:
...
@@ -143,6 +143,8 @@ start:
.
word
_magic_start
@
absolute
load
/
run
zImage
address
.
word
_magic_start
@
absolute
load
/
run
zImage
address
.
word
_magic_end
@
zImage
end
address
.
word
_magic_end
@
zImage
end
address
.
word
0x04030201
@
endianness
flag
.
word
0x04030201
@
endianness
flag
.
word
0x45454545
@
another
magic
number
to
indicate
.
word
_magic_table
@
additional
data
table
__EFI_HEADER
__EFI_HEADER
1
:
1
:
...
...
arch/arm/boot/compressed/vmlinux.lds.S
View file @
7f3d1f98
...
@@ -44,12 +44,22 @@ SECTIONS
...
@@ -44,12 +44,22 @@ SECTIONS
*(.
glue_7t
)
*(.
glue_7t
)
*(.
glue_7
)
*(.
glue_7
)
}
}
.
table
:
ALIGN
(
4
)
{
_table_start
=
.
;
LONG
(
ZIMAGE_MAGIC
(2))
LONG
(
ZIMAGE_MAGIC
(0
x5a534c4b
))
LONG
(
ZIMAGE_MAGIC
(
__piggy_size_addr
-
_start
))
LONG
(
ZIMAGE_MAGIC
(
_kernel_bss_size
))
LONG
(0)
_table_end
=
.
;
}
.
rodata
:
{
.
rodata
:
{
*(.
rodata
)
*(.
rodata
)
*(.
rodata
.*)
*(.
rodata
.*)
}
}
.
piggydata
:
{
.
piggydata
:
{
*(.
piggydata
)
*(.
piggydata
)
__piggy_size_addr
=
.
-
4
;
}
}
.
=
ALIGN
(
4
)
;
.
=
ALIGN
(
4
)
;
...
@@ -97,6 +107,7 @@ SECTIONS
...
@@ -97,6 +107,7 @@ SECTIONS
_magic_sig
=
ZIMAGE_MAGIC
(
0x016f2818
)
;
_magic_sig
=
ZIMAGE_MAGIC
(
0x016f2818
)
;
_magic_start
=
ZIMAGE_MAGIC
(
_start
)
;
_magic_start
=
ZIMAGE_MAGIC
(
_start
)
;
_magic_end
=
ZIMAGE_MAGIC
(
_edata
)
;
_magic_end
=
ZIMAGE_MAGIC
(
_edata
)
;
_magic_table
=
ZIMAGE_MAGIC
(
_table_start
-
_start
)
;
.
=
BSS_START
;
.
=
BSS_START
;
__bss_start
=
.
;
__bss_start
=
.
;
...
...
arch/arm/include/asm/dma-mapping.h
View file @
7f3d1f98
...
@@ -189,13 +189,6 @@ extern int arm_dma_mmap(struct device *dev, struct vm_area_struct *vma,
...
@@ -189,13 +189,6 @@ extern int arm_dma_mmap(struct device *dev, struct vm_area_struct *vma,
void
*
cpu_addr
,
dma_addr_t
dma_addr
,
size_t
size
,
void
*
cpu_addr
,
dma_addr_t
dma_addr
,
size_t
size
,
unsigned
long
attrs
);
unsigned
long
attrs
);
/*
* This can be called during early boot to increase the size of the atomic
* coherent DMA pool above the default value of 256KiB. It must be called
* before postcore_initcall.
*/
extern
void
__init
init_dma_coherent_pool_size
(
unsigned
long
size
);
/*
/*
* For SA-1111, IXP425, and ADI systems the dma-mapping functions are "magic"
* For SA-1111, IXP425, and ADI systems the dma-mapping functions are "magic"
* and utilize bounce buffers as needed to work around limited DMA windows.
* and utilize bounce buffers as needed to work around limited DMA windows.
...
...
arch/arm/include/asm/highmem.h
View file @
7f3d1f98
...
@@ -18,7 +18,6 @@
...
@@ -18,7 +18,6 @@
} while (0)
} while (0)
extern
pte_t
*
pkmap_page_table
;
extern
pte_t
*
pkmap_page_table
;
extern
pte_t
*
fixmap_page_table
;
extern
void
*
kmap_high
(
struct
page
*
page
);
extern
void
*
kmap_high
(
struct
page
*
page
);
extern
void
kunmap_high
(
struct
page
*
page
);
extern
void
kunmap_high
(
struct
page
*
page
);
...
...
arch/arm/kernel/atags_parse.c
View file @
7f3d1f98
...
@@ -196,11 +196,8 @@ setup_machine_tags(phys_addr_t __atags_pointer, unsigned int machine_nr)
...
@@ -196,11 +196,8 @@ setup_machine_tags(phys_addr_t __atags_pointer, unsigned int machine_nr)
break
;
break
;
}
}
if
(
!
mdesc
)
{
if
(
!
mdesc
)
early_print
(
"
\n
Error: unrecognized/unsupported machine ID"
return
NULL
;
" (r1 = 0x%08x).
\n\n
"
,
machine_nr
);
dump_machine_table
();
/* does not return */
}
if
(
__atags_pointer
)
if
(
__atags_pointer
)
tags
=
phys_to_virt
(
__atags_pointer
);
tags
=
phys_to_virt
(
__atags_pointer
);
...
...
arch/arm/kernel/debug.S
View file @
7f3d1f98
...
@@ -55,7 +55,9 @@ ENDPROC(printhex4)
...
@@ -55,7 +55,9 @@ ENDPROC(printhex4)
ENTRY
(
printhex2
)
ENTRY
(
printhex2
)
mov
r1
,
#
2
mov
r1
,
#
2
printhex
:
adr
r2
,
hexbuf
printhex
:
adr
r2
,
hexbuf_rel
ldr
r3
,
[
r2
]
add
r2
,
r2
,
r3
add
r3
,
r2
,
r1
add
r3
,
r2
,
r1
mov
r1
,
#
0
mov
r1
,
#
0
strb
r1
,
[
r3
]
strb
r1
,
[
r3
]
...
@@ -71,7 +73,11 @@ printhex: adr r2, hexbuf
...
@@ -71,7 +73,11 @@ printhex: adr r2, hexbuf
b
printascii
b
printascii
ENDPROC
(
printhex2
)
ENDPROC
(
printhex2
)
hexbuf
:
.
space
16
.
pushsection
.
bss
hexbuf_addr
:
.
space
16
.
popsection
.
align
hexbuf_rel
:
.
long
hexbuf_addr
-
.
.
ltorg
.
ltorg
...
@@ -79,25 +85,28 @@ hexbuf: .space 16
...
@@ -79,25 +85,28 @@ hexbuf: .space 16
ENTRY
(
printascii
)
ENTRY
(
printascii
)
addruart_current
r3
,
r1
,
r2
addruart_current
r3
,
r1
,
r2
b
2
f
1
:
teq
r0
,
#
0
1
:
waituart
r2
,
r3
senduart
r1
,
r3
busyuart
r2
,
r3
teq
r1
,
#
'\n'
moveq
r1
,
#
'\r'
beq
1
b
2
:
teq
r0
,
#
0
ldrneb
r1
,
[
r0
],
#
1
ldrneb
r1
,
[
r0
],
#
1
teqne
r1
,
#
0
teqne
r1
,
#
0
bne
1
b
reteq
lr
ret
lr
2
:
teq
r1
,
#
'\n'
bne
3
f
mov
r1
,
#
'\r'
waituart
r2
,
r3
senduart
r1
,
r3
busyuart
r2
,
r3
mov
r1
,
#
'\n'
3
:
waituart
r2
,
r3
senduart
r1
,
r3
busyuart
r2
,
r3
b
1
b
ENDPROC
(
printascii
)
ENDPROC
(
printascii
)
ENTRY
(
printch
)
ENTRY
(
printch
)
addruart_current
r3
,
r1
,
r2
addruart_current
r3
,
r1
,
r2
mov
r1
,
r0
mov
r1
,
r0
mov
r0
,
#
0
mov
r0
,
#
0
b
1
b
b
2
b
ENDPROC
(
printch
)
ENDPROC
(
printch
)
#ifdef CONFIG_MMU
#ifdef CONFIG_MMU
...
@@ -124,7 +133,9 @@ ENTRY(printascii)
...
@@ -124,7 +133,9 @@ ENTRY(printascii)
ENDPROC
(
printascii
)
ENDPROC
(
printascii
)
ENTRY
(
printch
)
ENTRY
(
printch
)
adr
r1
,
hexbuf
adr
r1
,
hexbuf_rel
ldr
r2
,
[
r1
]
add
r1
,
r1
,
r2
strb
r0
,
[
r1
]
strb
r0
,
[
r1
]
mov
r0
,
#
0x03
@
SYS_WRITEC
mov
r0
,
#
0x03
@
SYS_WRITEC
ARM
(
svc
#
0x123456
)
ARM
(
svc
#
0x123456
)
...
...
arch/arm/kernel/early_printk.c
View file @
7f3d1f98
...
@@ -11,16 +11,20 @@
...
@@ -11,16 +11,20 @@
#include <linux/kernel.h>
#include <linux/kernel.h>
#include <linux/console.h>
#include <linux/console.h>
#include <linux/init.h>
#include <linux/init.h>
#include <linux/string.h>
extern
void
print
ch
(
int
);
extern
void
print
ascii
(
const
char
*
);
static
void
early_write
(
const
char
*
s
,
unsigned
n
)
static
void
early_write
(
const
char
*
s
,
unsigned
n
)
{
{
while
(
n
--
>
0
)
{
char
buf
[
128
];
if
(
*
s
==
'\n'
)
while
(
n
)
{
printch
(
'\r'
);
unsigned
l
=
min
(
n
,
sizeof
(
buf
)
-
1
);
printch
(
*
s
);
memcpy
(
buf
,
s
,
l
);
s
++
;
buf
[
l
]
=
0
;
s
+=
l
;
n
-=
l
;
printascii
(
buf
);
}
}
}
}
...
...
arch/arm/kernel/entry-common.S
View file @
7f3d1f98
...
@@ -394,17 +394,8 @@ ENDPROC(sys_fstatfs64_wrapper)
...
@@ -394,17 +394,8 @@ ENDPROC(sys_fstatfs64_wrapper)
*
offset
,
we
return
EINVAL
.
*
offset
,
we
return
EINVAL
.
*/
*/
sys_mmap2
:
sys_mmap2
:
#if PAGE_SHIFT > 12
tst
r5
,
#
PGOFF_MASK
moveq
r5
,
r5
,
lsr
#
PAGE_SHIFT
-
12
streq
r5
,
[
sp
,
#
4
]
beq
sys_mmap_pgoff
mov
r0
,
#-
EINVAL
ret
lr
#else
str
r5
,
[
sp
,
#
4
]
str
r5
,
[
sp
,
#
4
]
b
sys_mmap_pgoff
b
sys_mmap_pgoff
#endif
ENDPROC
(
sys_mmap2
)
ENDPROC
(
sys_mmap2
)
#ifdef CONFIG_OABI_COMPAT
#ifdef CONFIG_OABI_COMPAT
...
...
arch/arm/kernel/setup.c
View file @
7f3d1f98
...
@@ -1069,6 +1069,16 @@ void __init setup_arch(char **cmdline_p)
...
@@ -1069,6 +1069,16 @@ void __init setup_arch(char **cmdline_p)
mdesc
=
setup_machine_fdt
(
__atags_pointer
);
mdesc
=
setup_machine_fdt
(
__atags_pointer
);
if
(
!
mdesc
)
if
(
!
mdesc
)
mdesc
=
setup_machine_tags
(
__atags_pointer
,
__machine_arch_type
);
mdesc
=
setup_machine_tags
(
__atags_pointer
,
__machine_arch_type
);
if
(
!
mdesc
)
{
early_print
(
"
\n
Error: invalid dtb and unrecognized/unsupported machine ID
\n
"
);
early_print
(
" r1=0x%08x, r2=0x%08x
\n
"
,
__machine_arch_type
,
__atags_pointer
);
if
(
__atags_pointer
)
early_print
(
" r2[]=%*ph
\n
"
,
16
,
phys_to_virt
(
__atags_pointer
));
dump_machine_table
();
}
machine_desc
=
mdesc
;
machine_desc
=
mdesc
;
machine_name
=
mdesc
->
name
;
machine_name
=
mdesc
->
name
;
dump_stack_set_arch_desc
(
"%s"
,
mdesc
->
name
);
dump_stack_set_arch_desc
(
"%s"
,
mdesc
->
name
);
...
...
arch/arm/mm/dma-mapping.c
View file @
7f3d1f98
...
@@ -382,9 +382,9 @@ static void __dma_free_remap(void *cpu_addr, size_t size)
...
@@ -382,9 +382,9 @@ static void __dma_free_remap(void *cpu_addr, size_t size)
}
}
#define DEFAULT_DMA_COHERENT_POOL_SIZE SZ_256K
#define DEFAULT_DMA_COHERENT_POOL_SIZE SZ_256K
static
struct
gen_pool
*
atomic_pool
;
static
struct
gen_pool
*
atomic_pool
__ro_after_init
;
static
size_t
atomic_pool_size
=
DEFAULT_DMA_COHERENT_POOL_SIZE
;
static
size_t
atomic_pool_size
__initdata
=
DEFAULT_DMA_COHERENT_POOL_SIZE
;
static
int
__init
early_coherent_pool
(
char
*
p
)
static
int
__init
early_coherent_pool
(
char
*
p
)
{
{
...
@@ -393,21 +393,6 @@ static int __init early_coherent_pool(char *p)
...
@@ -393,21 +393,6 @@ static int __init early_coherent_pool(char *p)
}
}
early_param
(
"coherent_pool"
,
early_coherent_pool
);
early_param
(
"coherent_pool"
,
early_coherent_pool
);
void
__init
init_dma_coherent_pool_size
(
unsigned
long
size
)
{
/*
* Catch any attempt to set the pool size too late.
*/
BUG_ON
(
atomic_pool
);
/*
* Set architecture specific coherent pool size only if
* it has not been changed by kernel command line parameter.
*/
if
(
atomic_pool_size
==
DEFAULT_DMA_COHERENT_POOL_SIZE
)
atomic_pool_size
=
size
;
}
/*
/*
* Initialise the coherent pool for atomic allocations.
* Initialise the coherent pool for atomic allocations.
*/
*/
...
@@ -443,7 +428,7 @@ static int __init atomic_pool_init(void)
...
@@ -443,7 +428,7 @@ static int __init atomic_pool_init(void)
gen_pool_set_algo
(
atomic_pool
,
gen_pool_set_algo
(
atomic_pool
,
gen_pool_first_fit_order_align
,
gen_pool_first_fit_order_align
,
(
void
*
)
PAGE_SHIFT
);
NULL
);
pr_info
(
"DMA: preallocated %zu KiB pool for atomic coherent allocations
\n
"
,
pr_info
(
"DMA: preallocated %zu KiB pool for atomic coherent allocations
\n
"
,
atomic_pool_size
/
1024
);
atomic_pool_size
/
1024
);
return
0
;
return
0
;
...
...
arch/arm/mm/init.c
View file @
7f3d1f98
...
@@ -580,16 +580,6 @@ void __init mem_init(void)
...
@@ -580,16 +580,6 @@ void __init mem_init(void)
BUILD_BUG_ON
(
PKMAP_BASE
+
LAST_PKMAP
*
PAGE_SIZE
>
PAGE_OFFSET
);
BUILD_BUG_ON
(
PKMAP_BASE
+
LAST_PKMAP
*
PAGE_SIZE
>
PAGE_OFFSET
);
BUG_ON
(
PKMAP_BASE
+
LAST_PKMAP
*
PAGE_SIZE
>
PAGE_OFFSET
);
BUG_ON
(
PKMAP_BASE
+
LAST_PKMAP
*
PAGE_SIZE
>
PAGE_OFFSET
);
#endif
#endif
if
(
PAGE_SIZE
>=
16384
&&
get_num_physpages
()
<=
128
)
{
extern
int
sysctl_overcommit_memory
;
/*
* On a machine this small we won't get
* anywhere without overcommit, so turn
* it on by default.
*/
sysctl_overcommit_memory
=
OVERCOMMIT_ALWAYS
;
}
}
}
#ifdef CONFIG_STRICT_KERNEL_RWX
#ifdef CONFIG_STRICT_KERNEL_RWX
...
...
drivers/pcmcia/sa1111_generic.c
View file @
7f3d1f98
...
@@ -63,11 +63,12 @@
...
@@ -63,11 +63,12 @@
#define IDX_IRQ_S1_READY_NINT (3)
#define IDX_IRQ_S1_READY_NINT (3)
#define IDX_IRQ_S1_CD_VALID (4)
#define IDX_IRQ_S1_CD_VALID (4)
#define IDX_IRQ_S1_BVD1_STSCHG (5)
#define IDX_IRQ_S1_BVD1_STSCHG (5)
#define NUM_IRQS (6)
void
sa1111_pcmcia_socket_state
(
struct
soc_pcmcia_socket
*
skt
,
struct
pcmcia_state
*
state
)
void
sa1111_pcmcia_socket_state
(
struct
soc_pcmcia_socket
*
skt
,
struct
pcmcia_state
*
state
)
{
{
struct
sa1111_pcmcia_socket
*
s
=
to_skt
(
skt
);
struct
sa1111_pcmcia_socket
*
s
=
to_skt
(
skt
);
u
nsigned
long
status
=
sa1111_readl
(
s
->
dev
->
mapbase
+
PCSR
);
u
32
status
=
readl_relaxed
(
s
->
dev
->
mapbase
+
PCSR
);
switch
(
skt
->
nr
)
{
switch
(
skt
->
nr
)
{
case
0
:
case
0
:
...
@@ -95,7 +96,7 @@ void sa1111_pcmcia_socket_state(struct soc_pcmcia_socket *skt, struct pcmcia_sta
...
@@ -95,7 +96,7 @@ void sa1111_pcmcia_socket_state(struct soc_pcmcia_socket *skt, struct pcmcia_sta
int
sa1111_pcmcia_configure_socket
(
struct
soc_pcmcia_socket
*
skt
,
const
socket_state_t
*
state
)
int
sa1111_pcmcia_configure_socket
(
struct
soc_pcmcia_socket
*
skt
,
const
socket_state_t
*
state
)
{
{
struct
sa1111_pcmcia_socket
*
s
=
to_skt
(
skt
);
struct
sa1111_pcmcia_socket
*
s
=
to_skt
(
skt
);
u
nsigned
int
pccr_skt_mask
,
pccr_set_mask
,
val
;
u
32
pccr_skt_mask
,
pccr_set_mask
,
val
;
unsigned
long
flags
;
unsigned
long
flags
;
switch
(
skt
->
nr
)
{
switch
(
skt
->
nr
)
{
...
@@ -123,10 +124,10 @@ int sa1111_pcmcia_configure_socket(struct soc_pcmcia_socket *skt, const socket_s
...
@@ -123,10 +124,10 @@ int sa1111_pcmcia_configure_socket(struct soc_pcmcia_socket *skt, const socket_s
pccr_set_mask
|=
PCCR_S0_FLT
|
PCCR_S1_FLT
;
pccr_set_mask
|=
PCCR_S0_FLT
|
PCCR_S1_FLT
;
local_irq_save
(
flags
);
local_irq_save
(
flags
);
val
=
sa1111_readl
(
s
->
dev
->
mapbase
+
PCCR
);
val
=
readl_relaxed
(
s
->
dev
->
mapbase
+
PCCR
);
val
&=
~
pccr_skt_mask
;
val
&=
~
pccr_skt_mask
;
val
|=
pccr_set_mask
&
pccr_skt_mask
;
val
|=
pccr_set_mask
&
pccr_skt_mask
;
sa1111_writel
(
val
,
s
->
dev
->
mapbase
+
PCCR
);
writel_relaxed
(
val
,
s
->
dev
->
mapbase
+
PCCR
);
local_irq_restore
(
flags
);
local_irq_restore
(
flags
);
return
0
;
return
0
;
...
@@ -137,12 +138,18 @@ int sa1111_pcmcia_add(struct sa1111_dev *dev, struct pcmcia_low_level *ops,
...
@@ -137,12 +138,18 @@ int sa1111_pcmcia_add(struct sa1111_dev *dev, struct pcmcia_low_level *ops,
{
{
struct
sa1111_pcmcia_socket
*
s
;
struct
sa1111_pcmcia_socket
*
s
;
struct
clk
*
clk
;
struct
clk
*
clk
;
int
i
,
ret
=
0
;
int
i
,
ret
=
0
,
irqs
[
NUM_IRQS
]
;
clk
=
devm_clk_get
(
&
dev
->
dev
,
NULL
);
clk
=
devm_clk_get
(
&
dev
->
dev
,
NULL
);
if
(
IS_ERR
(
clk
))
if
(
IS_ERR
(
clk
))
return
PTR_ERR
(
clk
);
return
PTR_ERR
(
clk
);
for
(
i
=
0
;
i
<
NUM_IRQS
;
i
++
)
{
irqs
[
i
]
=
sa1111_get_irq
(
dev
,
i
);
if
(
irqs
[
i
]
<=
0
)
return
irqs
[
i
]
?
:
-
ENXIO
;
}
ops
->
socket_state
=
sa1111_pcmcia_socket_state
;
ops
->
socket_state
=
sa1111_pcmcia_socket_state
;
for
(
i
=
0
;
i
<
ops
->
nr
;
i
++
)
{
for
(
i
=
0
;
i
<
ops
->
nr
;
i
++
)
{
...
@@ -156,16 +163,16 @@ int sa1111_pcmcia_add(struct sa1111_dev *dev, struct pcmcia_low_level *ops,
...
@@ -156,16 +163,16 @@ int sa1111_pcmcia_add(struct sa1111_dev *dev, struct pcmcia_low_level *ops,
soc_pcmcia_init_one
(
&
s
->
soc
,
ops
,
&
dev
->
dev
);
soc_pcmcia_init_one
(
&
s
->
soc
,
ops
,
&
dev
->
dev
);
s
->
dev
=
dev
;
s
->
dev
=
dev
;
if
(
s
->
soc
.
nr
)
{
if
(
s
->
soc
.
nr
)
{
s
->
soc
.
socket
.
pci_irq
=
dev
->
irq
[
IDX_IRQ_S1_READY_NINT
];
s
->
soc
.
socket
.
pci_irq
=
irqs
[
IDX_IRQ_S1_READY_NINT
];
s
->
soc
.
stat
[
SOC_STAT_CD
].
irq
=
dev
->
irq
[
IDX_IRQ_S1_CD_VALID
];
s
->
soc
.
stat
[
SOC_STAT_CD
].
irq
=
irqs
[
IDX_IRQ_S1_CD_VALID
];
s
->
soc
.
stat
[
SOC_STAT_CD
].
name
=
"SA1111 CF card detect"
;
s
->
soc
.
stat
[
SOC_STAT_CD
].
name
=
"SA1111 CF card detect"
;
s
->
soc
.
stat
[
SOC_STAT_BVD1
].
irq
=
dev
->
irq
[
IDX_IRQ_S1_BVD1_STSCHG
];
s
->
soc
.
stat
[
SOC_STAT_BVD1
].
irq
=
irqs
[
IDX_IRQ_S1_BVD1_STSCHG
];
s
->
soc
.
stat
[
SOC_STAT_BVD1
].
name
=
"SA1111 CF BVD1"
;
s
->
soc
.
stat
[
SOC_STAT_BVD1
].
name
=
"SA1111 CF BVD1"
;
}
else
{
}
else
{
s
->
soc
.
socket
.
pci_irq
=
dev
->
irq
[
IDX_IRQ_S0_READY_NINT
];
s
->
soc
.
socket
.
pci_irq
=
irqs
[
IDX_IRQ_S0_READY_NINT
];
s
->
soc
.
stat
[
SOC_STAT_CD
].
irq
=
dev
->
irq
[
IDX_IRQ_S0_CD_VALID
];
s
->
soc
.
stat
[
SOC_STAT_CD
].
irq
=
irqs
[
IDX_IRQ_S0_CD_VALID
];
s
->
soc
.
stat
[
SOC_STAT_CD
].
name
=
"SA1111 PCMCIA card detect"
;
s
->
soc
.
stat
[
SOC_STAT_CD
].
name
=
"SA1111 PCMCIA card detect"
;
s
->
soc
.
stat
[
SOC_STAT_BVD1
].
irq
=
dev
->
irq
[
IDX_IRQ_S0_BVD1_STSCHG
];
s
->
soc
.
stat
[
SOC_STAT_BVD1
].
irq
=
irqs
[
IDX_IRQ_S0_BVD1_STSCHG
];
s
->
soc
.
stat
[
SOC_STAT_BVD1
].
name
=
"SA1111 PCMCIA BVD1"
;
s
->
soc
.
stat
[
SOC_STAT_BVD1
].
name
=
"SA1111 PCMCIA BVD1"
;
}
}
...
@@ -201,8 +208,8 @@ static int pcmcia_probe(struct sa1111_dev *dev)
...
@@ -201,8 +208,8 @@ static int pcmcia_probe(struct sa1111_dev *dev)
/*
/*
* Initialise the suspend state.
* Initialise the suspend state.
*/
*/
sa1111_writel
(
PCSSR_S0_SLEEP
|
PCSSR_S1_SLEEP
,
base
+
PCSSR
);
writel_relaxed
(
PCSSR_S0_SLEEP
|
PCSSR_S1_SLEEP
,
base
+
PCSSR
);
sa1111_writel
(
PCCR_S0_FLT
|
PCCR_S1_FLT
,
base
+
PCCR
);
writel_relaxed
(
PCCR_S0_FLT
|
PCCR_S1_FLT
,
base
+
PCCR
);
ret
=
-
ENODEV
;
ret
=
-
ENODEV
;
#ifdef CONFIG_SA1100_BADGE4
#ifdef CONFIG_SA1100_BADGE4
...
...
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