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
71d1c9ff
Commit
71d1c9ff
authored
Sep 10, 2003
by
Linus Torvalds
Browse files
Options
Browse Files
Download
Plain Diff
Merge
bk://bk.arm.linux.org.uk/linux-2.6-rmk
into home.osdl.org:/home/torvalds/v2.5/linux
parents
0d918abe
ccac8ee2
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
156 additions
and
70 deletions
+156
-70
arch/arm/boot/compressed/head-sa1100.S
arch/arm/boot/compressed/head-sa1100.S
+4
-0
arch/arm/common/sa1111.c
arch/arm/common/sa1111.c
+20
-18
arch/arm/mach-sa1100/simpad.c
arch/arm/mach-sa1100/simpad.c
+110
-19
drivers/mtd/maps/sa1100-flash.c
drivers/mtd/maps/sa1100-flash.c
+15
-20
drivers/pcmcia/sa1100_simpad.c
drivers/pcmcia/sa1100_simpad.c
+6
-7
include/asm-arm/hardware/sa1111.h
include/asm-arm/hardware/sa1111.h
+1
-6
No files found.
arch/arm/boot/compressed/head-sa1100.S
View file @
71d1c9ff
...
@@ -34,6 +34,10 @@ __SA1100_start:
...
@@ -34,6 +34,10 @@ __SA1100_start:
@
REVISIT_PFS168
:
Temporary
until
firmware
updated
to
use
assigned
machine
number
@
REVISIT_PFS168
:
Temporary
until
firmware
updated
to
use
assigned
machine
number
mov
r7
,
#
MACH_TYPE_PFS168
mov
r7
,
#
MACH_TYPE_PFS168
#endif
#endif
#ifdef CONFIG_SA1100_SIMPAD /
@
UNTIL
we
've something like an open bootldr
mov
r7
,
#
MACH_TYPE_SIMPAD
@
should
be
87
#endif
#ifdef CONFIG_SA1100_VICTOR
#ifdef CONFIG_SA1100_VICTOR
teq
r7
,
#
MACH_TYPE_VICTOR
teq
r7
,
#
MACH_TYPE_VICTOR
...
...
arch/arm/common/sa1111.c
View file @
71d1c9ff
...
@@ -957,17 +957,6 @@ static struct device_driver sa1111_device_driver = {
...
@@ -957,17 +957,6 @@ static struct device_driver sa1111_device_driver = {
.
resume
=
sa1111_resume
,
.
resume
=
sa1111_resume
,
};
};
/*
* Register the SA1111 driver with LDM.
*/
static
int
sa1111_driver_init
(
void
)
{
driver_register
(
&
sa1111_device_driver
);
return
0
;
}
arch_initcall
(
sa1111_driver_init
);
/*
/*
* Get the parent device driver (us) structure
* Get the parent device driver (us) structure
* from a child function device
* from a child function device
...
@@ -1180,13 +1169,6 @@ struct bus_type sa1111_bus_type = {
...
@@ -1180,13 +1169,6 @@ struct bus_type sa1111_bus_type = {
.
resume
=
sa1111_bus_resume
,
.
resume
=
sa1111_bus_resume
,
};
};
static
int
sa1111_rab_bus_init
(
void
)
{
return
bus_register
(
&
sa1111_bus_type
);
}
postcore_initcall
(
sa1111_rab_bus_init
);
int
sa1111_driver_register
(
struct
sa1111_driver
*
driver
)
int
sa1111_driver_register
(
struct
sa1111_driver
*
driver
)
{
{
driver
->
drv
.
probe
=
sa1111_bus_probe
;
driver
->
drv
.
probe
=
sa1111_bus_probe
;
...
@@ -1200,6 +1182,26 @@ void sa1111_driver_unregister(struct sa1111_driver *driver)
...
@@ -1200,6 +1182,26 @@ void sa1111_driver_unregister(struct sa1111_driver *driver)
driver_unregister
(
&
driver
->
drv
);
driver_unregister
(
&
driver
->
drv
);
}
}
static
int
__init
sa1111_init
(
void
)
{
int
ret
=
bus_register
(
&
sa1111_bus_type
);
if
(
ret
==
0
)
driver_register
(
&
sa1111_device_driver
);
return
ret
;
}
static
void
__exit
sa1111_exit
(
void
)
{
driver_unregister
(
&
sa1111_device_driver
);
bus_unregister
(
&
sa1111_bus_type
);
}
module_init
(
sa1111_init
);
module_exit
(
sa1111_exit
);
MODULE_DESCRIPTION
(
"Intel Corporation SA1111 core driver"
);
MODULE_LICENSE
(
"GPL"
);
EXPORT_SYMBOL
(
sa1111_check_dma_bug
);
EXPORT_SYMBOL
(
sa1111_check_dma_bug
);
EXPORT_SYMBOL
(
sa1111_select_audio_mode
);
EXPORT_SYMBOL
(
sa1111_select_audio_mode
);
EXPORT_SYMBOL
(
sa1111_set_audio_rate
);
EXPORT_SYMBOL
(
sa1111_set_audio_rate
);
...
...
arch/arm/mach-sa1100/simpad.c
View file @
71d1c9ff
...
@@ -9,24 +9,37 @@
...
@@ -9,24 +9,37 @@
#include <linux/tty.h>
#include <linux/tty.h>
#include <linux/proc_fs.h>
#include <linux/proc_fs.h>
#include <linux/string.h>
#include <linux/string.h>
#include <linux/pm.h>
#include <asm/irq.h>
#include <asm/hardware.h>
#include <asm/hardware.h>
#include <asm/setup.h>
#include <asm/setup.h>
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
#include <asm/mach/arch.h>
#include <asm/mach/map.h>
#include <asm/mach/map.h>
#include <asm/mach/serial_sa1100.h>
#include <asm/mach/serial_sa1100.h>
#include <asm/arch/simpad.h>
#include <asm/arch/registry.h>
#include <linux/serial_core.h>
#include <linux/serial_core.h>
#include <linux/ioport.h>
#include <asm/io.h>
#include "generic.h"
#include "generic.h"
long
cs3_shadow
;
long
cs3_shadow
;
long
get_cs3_shadow
()
long
get_cs3_shadow
(
void
)
{
{
return
cs3_shadow
;
return
cs3_shadow
;
}
}
void
set_cs3
(
long
value
)
{
*
(
CS3BUSTYPE
*
)(
CS3_BASE
)
=
cs3_shadow
=
value
;
}
void
set_cs3_bit
(
int
value
)
void
set_cs3_bit
(
int
value
)
{
{
cs3_shadow
|=
value
;
cs3_shadow
|=
value
;
...
@@ -39,10 +52,15 @@ void clear_cs3_bit(int value)
...
@@ -39,10 +52,15 @@ void clear_cs3_bit(int value)
*
(
CS3BUSTYPE
*
)(
CS3_BASE
)
=
cs3_shadow
;
*
(
CS3BUSTYPE
*
)(
CS3_BASE
)
=
cs3_shadow
;
}
}
EXPORT_SYMBOL
(
set_cs3_bit
);
EXPORT_SYMBOL
(
clear_cs3_bit
);
static
struct
map_desc
simpad_io_desc
[]
__initdata
=
{
static
struct
map_desc
simpad_io_desc
[]
__initdata
=
{
/* virtual physical length type */
/* virtual physical length type */
{
0xf2800000
,
0x4b800000
,
0x00800000
,
MT_DEVICE
},
/* MQ200 */
/* MQ200 */
{
0xf1000000
,
0x18000000
,
0x00100000
,
MT_DEVICE
}
/* Paules CS3, write only */
{
0xf2800000
,
0x4b800000
,
0x00800000
,
MT_DEVICE
},
/* Paules CS3, write only */
{
0xf1000000
,
0x18000000
,
0x00100000
,
MT_DEVICE
},
};
};
...
@@ -50,32 +68,52 @@ static void simpad_uart_pm(struct uart_port *port, u_int state, u_int oldstate)
...
@@ -50,32 +68,52 @@ static void simpad_uart_pm(struct uart_port *port, u_int state, u_int oldstate)
{
{
if
(
port
->
mapbase
==
(
u_int
)
&
Ser1UTCR0
)
{
if
(
port
->
mapbase
==
(
u_int
)
&
Ser1UTCR0
)
{
if
(
state
)
if
(
state
)
{
clear_cs3_bit
(
RS232_ON
);
clear_cs3_bit
(
RS232_ON
);
else
clear_cs3_bit
(
DECT_POWER_ON
);
}
else
{
set_cs3_bit
(
RS232_ON
);
set_cs3_bit
(
RS232_ON
);
set_cs3_bit
(
DECT_POWER_ON
);
}
}
}
}
}
static
struct
sa1100_port_fns
simpad_port_fns
__initdata
=
{
static
struct
sa1100_port_fns
simpad_port_fns
__initdata
=
{
.
pm
=
simpad_uart_pm
,
.
pm
=
simpad_uart_pm
,
};
};
static
void
__init
simpad_map_io
(
void
)
static
void
__init
simpad_map_io
(
void
)
{
{
sa1100_map_io
();
sa1100_map_io
();
iotable_init
(
simpad_io_desc
,
ARRAY_SIZE
(
simpad_io_desc
));
iotable_init
(
simpad_io_desc
,
ARRAY_SIZE
(
simpad_io_desc
));
PSPR
=
0xc0008000
;
set_cs3_bit
(
EN1
|
EN0
|
LED2_ON
|
DISPLAY_ON
|
RS232_ON
|
GPDR
&=
~
GPIO_GPIO0
;
ENABLE_5V
|
RESET_SIMCARD
|
DECT_POWER_ON
);
cs3_shadow
=
(
EN1
|
EN0
|
LED2_ON
|
DISPLAY_ON
|
RS232_ON
|
ENABLE_5V
|
RESET_SIMCARD
);
*
(
CS3BUSTYPE
*
)(
CS3_BASE
)
=
cs3_shadow
;
sa1100_register_uart_fns
(
&
simpad_port_fns
);
sa1100_register_uart
(
0
,
3
);
/* serial interface */
sa1100_register_uart
(
1
,
1
);
/* DECT */
// Reassign UART 1 pins
GAFR
|=
GPIO_UART_TXD
|
GPIO_UART_RXD
;
GPDR
|=
GPIO_UART_TXD
|
GPIO_LDD13
|
GPIO_LDD15
;
GPDR
&=
~
GPIO_UART_RXD
;
PPAR
|=
PPAR_UPR
;
/*
* Set up registers for sleep mode.
*/
PWER
=
PWER_GPIO0
|
PWER_RTC
;
PGSR
=
0x818
;
PCFR
=
0
;
PSDR
=
0
;
//It is only possible to register 3 UART in serial_sa1100.c
sa1100_register_uart
(
0
,
3
);
sa1100_register_uart
(
1
,
1
);
set_irq_type
(
IRQ_GPIO_UCB1300_IRQ
,
IRQT_RISING
);
}
}
#ifdef CONFIG_PROC_FS
#ifdef CONFIG_PROC_FS
...
@@ -105,7 +143,7 @@ static int proc_cs3_read(char *page, char **start, off_t off,
...
@@ -105,7 +143,7 @@ static int proc_cs3_read(char *page, char **start, off_t off,
char
*
p
=
page
;
char
*
p
=
page
;
int
len
,
i
;
int
len
,
i
;
p
+=
sprintf
(
p
,
"Chipselect3 : %x
\n
"
,
cs3_shadow
);
p
+=
sprintf
(
p
,
"Chipselect3 : %x
\n
"
,
(
uint
)
cs3_shadow
);
for
(
i
=
0
;
i
<=
15
;
i
++
)
{
for
(
i
=
0
;
i
<=
15
;
i
++
)
{
if
(
cs3_shadow
&
(
1
<<
i
))
{
if
(
cs3_shadow
&
(
1
<<
i
))
{
p
+=
sprintf
(
p
,
"%s
\t
: TRUE
\n
"
,
name
[
i
]);
p
+=
sprintf
(
p
,
"%s
\t
: TRUE
\n
"
,
name
[
i
]);
...
@@ -121,23 +159,76 @@ static int proc_cs3_read(char *page, char **start, off_t off,
...
@@ -121,23 +159,76 @@ static int proc_cs3_read(char *page, char **start, off_t off,
return
len
;
return
len
;
}
}
static
int
proc_cs3_write
(
struct
file
*
file
,
const
char
*
buffer
,
size_t
count
,
loff_t
*
ppos
)
{
unsigned
long
newRegValue
;
char
*
endp
;
newRegValue
=
simple_strtoul
(
buffer
,
&
endp
,
0
);
set_cs3
(
newRegValue
);
return
(
count
+
endp
-
buffer
);
}
#endif
static
int
__init
cs3_init
(
void
)
static
int
__init
cs3_init
(
void
)
{
{
struct
proc_dir_entry
*
proc_cs3
=
create_proc_entry
(
"cs3"
,
0
,
0
);
#ifdef CONFIG_PROC_FS
struct
proc_dir_entry
*
proc_cs3
=
create_proc_entry
(
"CS3"
,
0
,
0
);
if
(
proc_cs3
)
if
(
proc_cs3
)
{
proc_cs3
->
read_proc
=
proc_cs3_read
;
proc_cs3
->
read_proc
=
proc_cs3_read
;
proc_cs3
->
write_proc
=
(
void
*
)
proc_cs3_write
;
}
#endif
return
0
;
return
0
;
}
}
arch_initcall
(
cs3_init
);
arch_initcall
(
cs3_init
);
#endif // CONFIG_PROC_FS
static
void
simpad_power_off
(
void
)
{
local_irq_disable
();
// was cli
set_cs3
(
0x800
);
/* only SD_MEDIAQ */
/* disable internal oscillator, float CS lines */
PCFR
=
(
PCFR_OPDE
|
PCFR_FP
|
PCFR_FS
);
/* enable wake-up on GPIO0 (Assabet...) */
PWER
=
GFER
=
GRER
=
1
;
/*
* set scratchpad to zero, just in case it is used as a
* restart address by the bootloader.
*/
PSPR
=
0
;
PGSR
=
0
;
/* enter sleep mode */
PMCR
=
PMCR_SF
;
while
(
1
);
local_irq_enable
();
/* we won't ever call it */
}
static
int
__init
simpad_init
(
void
)
{
set_power_off_handler
(
simpad_power_off
);
return
0
;
}
arch_initcall
(
simpad_init
);
MACHINE_START
(
SIMPAD
,
"Simpad"
)
MACHINE_START
(
SIMPAD
,
"Simpad"
)
MAINTAINER
(
"Juergen Messerer"
)
MAINTAINER
(
"Juergen Messerer"
)
BOOT_MEM
(
0xc0000000
,
0x80000000
,
0xf8000000
)
BOOT_MEM
(
0xc0000000
,
0x80000000
,
0xf8000000
)
BOOT_PARAMS
(
0xc0000100
)
MAPIO
(
simpad_map_io
)
MAPIO
(
simpad_map_io
)
INITIRQ
(
sa1100_init_irq
)
INITIRQ
(
sa1100_init_irq
)
MACHINE_END
MACHINE_END
drivers/mtd/maps/sa1100-flash.c
View file @
71d1c9ff
...
@@ -654,28 +654,21 @@ static struct mtd_partition simpad_partitions[] = {
...
@@ -654,28 +654,21 @@ static struct mtd_partition simpad_partitions[] = {
},
{
},
{
.
name
=
"SIMpad kernel"
,
.
name
=
"SIMpad kernel"
,
.
size
=
0x00100000
,
.
size
=
0x00100000
,
.
offset
=
0x00080000
,
.
offset
=
MTDPART_OFS_APPEND
,
},
{
#ifdef CONFIG_JFFS2_FS
.
name
=
"SIMpad root jffs2"
,
.
size
=
MTDPART_SIZ_FULL
,
.
offset
=
0x00180000
,
#else
.
name
=
"SIMpad initrd"
,
.
size
=
0x00300000
,
.
offset
=
0x00180000
,
},
{
},
{
#ifdef CONFIG_ROOT_CRAMFS
.
name
=
"SIMpad root cramfs"
,
.
name
=
"SIMpad root cramfs"
,
.
size
=
0x00300000
,
.
size
=
0x00D80000
,
.
offset
=
0x00480000
,
.
offset
=
MTDPART_OFS_APPEND
},
{
.
name
=
"SIMpad usr cramfs"
,
.
size
=
0x005c0000
,
.
offset
=
0x00780000
,
},
{
},
{
.
name
=
"SIMpad usr local"
,
.
name
=
"SIMpad local jffs2"
,
.
size
=
MTDPART_SIZ_FULL
,
.
offset
=
MTDPART_OFS_APPEND
#else
.
name
=
"SIMpad root jffs2"
,
.
size
=
MTDPART_SIZ_FULL
,
.
size
=
MTDPART_SIZ_FULL
,
.
offset
=
0x00d40000
,
.
offset
=
MTDPART_OFS_APPEND
#endif
#endif
}
}
};
};
...
@@ -1244,8 +1237,10 @@ static int __init sa1100_locate_flash(void)
...
@@ -1244,8 +1237,10 @@ static int __init sa1100_locate_flash(void)
}
}
if
(
machine_is_simpad
())
{
if
(
machine_is_simpad
())
{
info
[
0
].
base
=
SA1100_CS0_PHYS
;
info
[
0
].
base
=
SA1100_CS0_PHYS
;
info
[
0
].
size
=
SZ_32M
;
info
[
0
].
size
=
SZ_16M
;
nr
=
1
;
info
[
1
].
base
=
SA1100_CS1_PHYS
;
info
[
1
].
size
=
SZ_16M
;
nr
=
2
;
}
}
if
(
machine_is_stork
())
{
if
(
machine_is_stork
())
{
info
[
0
].
base
=
SA1100_CS0_PHYS
;
info
[
0
].
base
=
SA1100_CS0_PHYS
;
...
...
drivers/pcmcia/sa1100_simpad.c
View file @
71d1c9ff
...
@@ -13,6 +13,7 @@
...
@@ -13,6 +13,7 @@
#include <asm/hardware.h>
#include <asm/hardware.h>
#include <asm/mach-types.h>
#include <asm/mach-types.h>
#include <asm/irq.h>
#include <asm/irq.h>
#include <asm/arch/simpad.h>
#include "sa1100_generic.h"
#include "sa1100_generic.h"
extern
long
get_cs3_shadow
(
void
);
extern
long
get_cs3_shadow
(
void
);
...
@@ -25,9 +26,6 @@ static struct pcmcia_irqs irqs[] = {
...
@@ -25,9 +26,6 @@ static struct pcmcia_irqs irqs[] = {
static
int
simpad_pcmcia_hw_init
(
struct
sa1100_pcmcia_socket
*
skt
)
static
int
simpad_pcmcia_hw_init
(
struct
sa1100_pcmcia_socket
*
skt
)
{
{
set_cs3_bit
(
PCMCIA_RESET
);
clear_cs3_bit
(
PCMCIA_BUFF_DIS
);
clear_cs3_bit
(
PCMCIA_RESET
);
clear_cs3_bit
(
VCC_3V_EN
|
VCC_5V_EN
|
EN0
|
EN1
);
clear_cs3_bit
(
VCC_3V_EN
|
VCC_5V_EN
|
EN0
|
EN1
);
...
@@ -71,7 +69,7 @@ static int
...
@@ -71,7 +69,7 @@ static int
simpad_pcmcia_configure_socket
(
struct
sa1100_pcmcia_socket
*
skt
,
simpad_pcmcia_configure_socket
(
struct
sa1100_pcmcia_socket
*
skt
,
const
socket_state_t
*
state
)
const
socket_state_t
*
state
)
{
{
unsigned
long
value
,
flags
;
unsigned
long
flags
;
local_irq_save
(
flags
);
local_irq_save
(
flags
);
...
@@ -82,8 +80,8 @@ simpad_pcmcia_configure_socket(struct sa1100_pcmcia_socket *skt,
...
@@ -82,8 +80,8 @@ simpad_pcmcia_configure_socket(struct sa1100_pcmcia_socket *skt,
break
;
break
;
case
33
:
case
33
:
clear_cs3_bit
(
VCC_3V_EN
|
EN
0
);
clear_cs3_bit
(
VCC_3V_EN
|
EN
1
);
set_cs3_bit
(
VCC_5V_EN
|
EN
1
);
set_cs3_bit
(
VCC_5V_EN
|
EN
0
);
break
;
break
;
case
50
:
case
50
:
...
@@ -99,7 +97,7 @@ simpad_pcmcia_configure_socket(struct sa1100_pcmcia_socket *skt,
...
@@ -99,7 +97,7 @@ simpad_pcmcia_configure_socket(struct sa1100_pcmcia_socket *skt,
return
-
1
;
return
-
1
;
}
}
/* Silently ignore Vpp, output enable, speaker enable. */
local_irq_restore
(
flags
);
local_irq_restore
(
flags
);
return
0
;
return
0
;
...
@@ -113,6 +111,7 @@ static void simpad_pcmcia_socket_init(struct sa1100_pcmcia_socket *skt)
...
@@ -113,6 +111,7 @@ static void simpad_pcmcia_socket_init(struct sa1100_pcmcia_socket *skt)
static
void
simpad_pcmcia_socket_suspend
(
struct
sa1100_pcmcia_socket
*
skt
)
static
void
simpad_pcmcia_socket_suspend
(
struct
sa1100_pcmcia_socket
*
skt
)
{
{
sa11xx_disable_irqs
(
skt
,
irqs
,
ARRAY_SIZE
(
irqs
));
sa11xx_disable_irqs
(
skt
,
irqs
,
ARRAY_SIZE
(
irqs
));
set_cs3_bit
(
PCMCIA_RESET
);
}
}
static
struct
pcmcia_low_level
simpad_pcmcia_ops
=
{
static
struct
pcmcia_low_level
simpad_pcmcia_ops
=
{
...
...
include/asm-arm/hardware/sa1111.h
View file @
71d1c9ff
...
@@ -543,7 +543,7 @@ struct sa1111_dev {
...
@@ -543,7 +543,7 @@ struct sa1111_dev {
#define SA1111_DEV(_d) container_of((_d), struct sa1111_dev, dev)
#define SA1111_DEV(_d) container_of((_d), struct sa1111_dev, dev)
#define sa1111_get_drvdata(d) dev_get_drvdata(&(d)->dev)
#define sa1111_get_drvdata(d) dev_get_drvdata(&(d)->dev)
#define sa1111_set_drvdata(d,p) dev_
g
et_drvdata(&(d)->dev, p)
#define sa1111_set_drvdata(d,p) dev_
s
et_drvdata(&(d)->dev, p)
struct
sa1111_driver
{
struct
sa1111_driver
{
struct
device_driver
drv
;
struct
device_driver
drv
;
...
@@ -558,11 +558,6 @@ struct sa1111_driver {
...
@@ -558,11 +558,6 @@ struct sa1111_driver {
#define SA1111_DRIVER_NAME(_sadev) ((_sadev)->dev.driver->name)
#define SA1111_DRIVER_NAME(_sadev) ((_sadev)->dev.driver->name)
/*
* Probe for a SA1111 chip.
*/
extern
int
sa1111_init
(
unsigned
long
phys
,
unsigned
int
irq
);
/*
/*
* These frob the SKPCR register.
* These frob the SKPCR register.
*/
*/
...
...
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