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
7e1ec8c8
Commit
7e1ec8c8
authored
Jun 26, 2004
by
Vojtech Pavlik
Browse files
Options
Browse Files
Download
Plain Diff
Merge suse.cz:/home/vojtech/bk/linus into suse.cz:/home/vojtech/bk/input
parents
4125f64c
f6a7507c
Changes
31
Hide whitespace changes
Inline
Side-by-side
Showing
31 changed files
with
1024 additions
and
155 deletions
+1024
-155
arch/ppc/kernel/ppc_ksyms.c
arch/ppc/kernel/ppc_ksyms.c
+0
-3
arch/sparc64/defconfig
arch/sparc64/defconfig
+59
-40
arch/sparc64/lib/find_bit.c
arch/sparc64/lib/find_bit.c
+3
-2
arch/v850/kernel/vmlinux.lds.S
arch/v850/kernel/vmlinux.lds.S
+3
-3
drivers/ide/ide-disk.c
drivers/ide/ide-disk.c
+13
-2
drivers/ide/legacy/ide-cs.c
drivers/ide/legacy/ide-cs.c
+0
-5
drivers/ide/pci/pdc202xx_old.c
drivers/ide/pci/pdc202xx_old.c
+6
-0
drivers/pcmcia/Kconfig
drivers/pcmcia/Kconfig
+7
-0
drivers/pcmcia/Makefile
drivers/pcmcia/Makefile
+1
-0
drivers/pcmcia/cistpl.c
drivers/pcmcia/cistpl.c
+13
-12
drivers/pcmcia/cs.c
drivers/pcmcia/cs.c
+19
-13
drivers/pcmcia/cs_internal.h
drivers/pcmcia/cs_internal.h
+2
-2
drivers/pcmcia/ds.c
drivers/pcmcia/ds.c
+2
-0
drivers/pcmcia/i82092.c
drivers/pcmcia/i82092.c
+2
-2
drivers/pcmcia/i82365.c
drivers/pcmcia/i82365.c
+2
-2
drivers/pcmcia/pd6729.c
drivers/pcmcia/pd6729.c
+732
-0
drivers/pcmcia/pd6729.h
drivers/pcmcia/pd6729.h
+28
-0
drivers/pcmcia/rsrc_mgr.c
drivers/pcmcia/rsrc_mgr.c
+31
-20
drivers/pcmcia/tcic.c
drivers/pcmcia/tcic.c
+2
-2
drivers/pcmcia/yenta_socket.c
drivers/pcmcia/yenta_socket.c
+2
-2
fs/isofs/inode.c
fs/isofs/inode.c
+3
-20
include/asm-ppc/smp.h
include/asm-ppc/smp.h
+0
-2
include/asm-ppc/system.h
include/asm-ppc/system.h
+0
-1
include/asm-sparc64/bitops.h
include/asm-sparc64/bitops.h
+2
-1
include/asm-sparc64/byteorder.h
include/asm-sparc64/byteorder.h
+3
-3
include/asm-v850/bitops.h
include/asm-v850/bitops.h
+76
-0
include/asm-v850/irq.h
include/asm-v850/irq.h
+3
-6
include/asm-v850/unistd.h
include/asm-v850/unistd.h
+2
-4
include/linux/iso_fs.h
include/linux/iso_fs.h
+6
-6
include/pcmcia/ss.h
include/pcmcia/ss.h
+1
-2
init/Kconfig
init/Kconfig
+1
-0
No files found.
arch/ppc/kernel/ppc_ksyms.c
View file @
7e1ec8c8
...
@@ -68,7 +68,6 @@ extern int sys_sigreturn(struct pt_regs *regs);
...
@@ -68,7 +68,6 @@ extern int sys_sigreturn(struct pt_regs *regs);
long
long
__ashrdi3
(
long
long
,
int
);
long
long
__ashrdi3
(
long
long
,
int
);
long
long
__ashldi3
(
long
long
,
int
);
long
long
__ashldi3
(
long
long
,
int
);
long
long
__lshrdi3
(
long
long
,
int
);
long
long
__lshrdi3
(
long
long
,
int
);
int
abs
(
int
);
extern
unsigned
long
mm_ptov
(
unsigned
long
paddr
);
extern
unsigned
long
mm_ptov
(
unsigned
long
paddr
);
...
@@ -276,8 +275,6 @@ EXPORT_SYMBOL(memscan);
...
@@ -276,8 +275,6 @@ EXPORT_SYMBOL(memscan);
EXPORT_SYMBOL
(
memcmp
);
EXPORT_SYMBOL
(
memcmp
);
EXPORT_SYMBOL
(
memchr
);
EXPORT_SYMBOL
(
memchr
);
EXPORT_SYMBOL
(
abs
);
#if defined(CONFIG_FB_VGA16_MODULE)
#if defined(CONFIG_FB_VGA16_MODULE)
EXPORT_SYMBOL
(
screen_info
);
EXPORT_SYMBOL
(
screen_info
);
#endif
#endif
...
...
arch/sparc64/defconfig
View file @
7e1ec8c8
...
@@ -110,6 +110,7 @@ CONFIG_DISPLAY7SEG=m
...
@@ -110,6 +110,7 @@ CONFIG_DISPLAY7SEG=m
#
#
# Generic Driver Options
# Generic Driver Options
#
#
# CONFIG_PREVENT_FIRMWARE_BUILD is not set
CONFIG_FW_LOADER=m
CONFIG_FW_LOADER=m
# CONFIG_DEBUG_DRIVER is not set
# CONFIG_DEBUG_DRIVER is not set
...
@@ -117,6 +118,7 @@ CONFIG_FW_LOADER=m
...
@@ -117,6 +118,7 @@ CONFIG_FW_LOADER=m
# Graphics support
# Graphics support
#
#
CONFIG_FB=y
CONFIG_FB=y
# CONFIG_FB_CIRRUS is not set
CONFIG_FB_PM2=y
CONFIG_FB_PM2=y
# CONFIG_FB_PM2_FIFO_DISCONNECT is not set
# CONFIG_FB_PM2_FIFO_DISCONNECT is not set
# CONFIG_FB_CYBER2000 is not set
# CONFIG_FB_CYBER2000 is not set
...
@@ -219,7 +221,7 @@ CONFIG_OBP_FLASH=m
...
@@ -219,7 +221,7 @@ CONFIG_OBP_FLASH=m
CONFIG_BLK_DEV_LOOP=m
CONFIG_BLK_DEV_LOOP=m
CONFIG_BLK_DEV_CRYPTOLOOP=m
CONFIG_BLK_DEV_CRYPTOLOOP=m
CONFIG_BLK_DEV_NBD=m
CONFIG_BLK_DEV_NBD=m
CONFIG_BLK_DEV_
CARMEL
=m
CONFIG_BLK_DEV_
SX8
=m
# CONFIG_BLK_DEV_RAM is not set
# CONFIG_BLK_DEV_RAM is not set
#
#
...
@@ -231,6 +233,7 @@ CONFIG_BLK_DEV_IDE=y
...
@@ -231,6 +233,7 @@ CONFIG_BLK_DEV_IDE=y
#
#
# Please see Documentation/ide.txt for help/info on IDE drives
# Please see Documentation/ide.txt for help/info on IDE drives
#
#
# CONFIG_BLK_DEV_IDE_SATA is not set
CONFIG_BLK_DEV_IDEDISK=y
CONFIG_BLK_DEV_IDEDISK=y
# CONFIG_IDEDISK_MULTI_MODE is not set
# CONFIG_IDEDISK_MULTI_MODE is not set
CONFIG_BLK_DEV_IDECD=y
CONFIG_BLK_DEV_IDECD=y
...
@@ -317,6 +320,7 @@ CONFIG_SCSI_FC_ATTRS=m
...
@@ -317,6 +320,7 @@ CONFIG_SCSI_FC_ATTRS=m
# SCSI low-level drivers
# SCSI low-level drivers
#
#
CONFIG_BLK_DEV_3W_XXXX_RAID=m
CONFIG_BLK_DEV_3W_XXXX_RAID=m
CONFIG_SCSI_3W_9XXX=m
CONFIG_SCSI_ACARD=m
CONFIG_SCSI_ACARD=m
CONFIG_SCSI_AACRAID=m
CONFIG_SCSI_AACRAID=m
# CONFIG_SCSI_AIC7XXX is not set
# CONFIG_SCSI_AIC7XXX is not set
...
@@ -334,6 +338,7 @@ CONFIG_AIC79XX_DEBUG_MASK=0
...
@@ -334,6 +338,7 @@ CONFIG_AIC79XX_DEBUG_MASK=0
CONFIG_SCSI_SATA=y
CONFIG_SCSI_SATA=y
CONFIG_SCSI_SATA_SVW=m
CONFIG_SCSI_SATA_SVW=m
CONFIG_SCSI_ATA_PIIX=m
CONFIG_SCSI_ATA_PIIX=m
CONFIG_SCSI_SATA_NV=m
CONFIG_SCSI_SATA_PROMISE=m
CONFIG_SCSI_SATA_PROMISE=m
CONFIG_SCSI_SATA_SX4=m
CONFIG_SCSI_SATA_SX4=m
CONFIG_SCSI_SATA_SIL=m
CONFIG_SCSI_SATA_SIL=m
...
@@ -407,6 +412,9 @@ CONFIG_MD_RAID6=m
...
@@ -407,6 +412,9 @@ CONFIG_MD_RAID6=m
CONFIG_MD_MULTIPATH=m
CONFIG_MD_MULTIPATH=m
CONFIG_BLK_DEV_DM=m
CONFIG_BLK_DEV_DM=m
CONFIG_DM_CRYPT=m
CONFIG_DM_CRYPT=m
CONFIG_DM_SNAPSHOT=m
CONFIG_DM_MIRROR=m
CONFIG_DM_ZERO=m
#
#
# Fusion MPT device support
# Fusion MPT device support
...
@@ -579,6 +587,8 @@ CONFIG_IP_NF_COMPAT_IPCHAINS=m
...
@@ -579,6 +587,8 @@ CONFIG_IP_NF_COMPAT_IPCHAINS=m
CONFIG_IP_NF_COMPAT_IPFWADM=m
CONFIG_IP_NF_COMPAT_IPFWADM=m
CONFIG_IP_NF_TARGET_NOTRACK=m
CONFIG_IP_NF_TARGET_NOTRACK=m
CONFIG_IP_NF_RAW=m
CONFIG_IP_NF_RAW=m
CONFIG_IP_NF_MATCH_ADDRTYPE=m
CONFIG_IP_NF_MATCH_REALM=m
#
#
# IPv6: Netfilter Configuration
# IPv6: Netfilter Configuration
...
@@ -696,9 +706,12 @@ CONFIG_NET_CLS_ROUTE4=m
...
@@ -696,9 +706,12 @@ CONFIG_NET_CLS_ROUTE4=m
CONFIG_NET_CLS_ROUTE=y
CONFIG_NET_CLS_ROUTE=y
CONFIG_NET_CLS_FW=m
CONFIG_NET_CLS_FW=m
CONFIG_NET_CLS_U32=m
CONFIG_NET_CLS_U32=m
CONFIG_CLS_U32_PERF=y
CONFIG_NET_CLS_IND=y
CONFIG_NET_CLS_RSVP=m
CONFIG_NET_CLS_RSVP=m
CONFIG_NET_CLS_RSVP6=m
CONFIG_NET_CLS_RSVP6=m
CONFIG_NET_CLS_POLICE=y
CONFIG_NET_CLS_ACT=y
CONFIG_NET_ACT_POLICE=m
#
#
# Network testing
# Network testing
...
@@ -860,6 +873,7 @@ CONFIG_SUNDANCE=m
...
@@ -860,6 +873,7 @@ CONFIG_SUNDANCE=m
CONFIG_SUNDANCE_MMIO=y
CONFIG_SUNDANCE_MMIO=y
CONFIG_VIA_RHINE=m
CONFIG_VIA_RHINE=m
# CONFIG_VIA_RHINE_MMIO is not set
# CONFIG_VIA_RHINE_MMIO is not set
CONFIG_VIA_VELOCITY=m
#
#
# Ethernet (1000 Mbit)
# Ethernet (1000 Mbit)
...
@@ -1195,6 +1209,8 @@ CONFIG_UDF_FS=m
...
@@ -1195,6 +1209,8 @@ CONFIG_UDF_FS=m
CONFIG_FAT_FS=m
CONFIG_FAT_FS=m
CONFIG_MSDOS_FS=m
CONFIG_MSDOS_FS=m
CONFIG_VFAT_FS=m
CONFIG_VFAT_FS=m
CONFIG_FAT_DEFAULT_CODEPAGE=437
CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
# CONFIG_NTFS_FS is not set
# CONFIG_NTFS_FS is not set
#
#
...
@@ -1255,6 +1271,7 @@ CONFIG_SMB_FS=m
...
@@ -1255,6 +1271,7 @@ CONFIG_SMB_FS=m
# CONFIG_SMB_NLS_DEFAULT is not set
# CONFIG_SMB_NLS_DEFAULT is not set
CONFIG_CIFS=m
CONFIG_CIFS=m
# CONFIG_CIFS_STATS is not set
# CONFIG_CIFS_STATS is not set
CONFIG_CIFS_POSIX=y
CONFIG_NCP_FS=m
CONFIG_NCP_FS=m
# CONFIG_NCPFS_PACKET_SIGNING is not set
# CONFIG_NCPFS_PACKET_SIGNING is not set
# CONFIG_NCPFS_IOCTL_LOCKING is not set
# CONFIG_NCPFS_IOCTL_LOCKING is not set
...
@@ -1281,43 +1298,44 @@ CONFIG_SUN_PARTITION=y
...
@@ -1281,43 +1298,44 @@ CONFIG_SUN_PARTITION=y
#
#
CONFIG_NLS=y
CONFIG_NLS=y
CONFIG_NLS_DEFAULT="iso8859-1"
CONFIG_NLS_DEFAULT="iso8859-1"
# CONFIG_NLS_CODEPAGE_437 is not set
CONFIG_NLS_CODEPAGE_437=m
# CONFIG_NLS_CODEPAGE_737 is not set
CONFIG_NLS_CODEPAGE_737=m
# CONFIG_NLS_CODEPAGE_775 is not set
CONFIG_NLS_CODEPAGE_775=m
# CONFIG_NLS_CODEPAGE_850 is not set
CONFIG_NLS_CODEPAGE_850=m
# CONFIG_NLS_CODEPAGE_852 is not set
CONFIG_NLS_CODEPAGE_852=m
# CONFIG_NLS_CODEPAGE_855 is not set
CONFIG_NLS_CODEPAGE_855=m
# CONFIG_NLS_CODEPAGE_857 is not set
CONFIG_NLS_CODEPAGE_857=m
# CONFIG_NLS_CODEPAGE_860 is not set
CONFIG_NLS_CODEPAGE_860=m
# CONFIG_NLS_CODEPAGE_861 is not set
CONFIG_NLS_CODEPAGE_861=m
# CONFIG_NLS_CODEPAGE_862 is not set
CONFIG_NLS_CODEPAGE_862=m
# CONFIG_NLS_CODEPAGE_863 is not set
CONFIG_NLS_CODEPAGE_863=m
# CONFIG_NLS_CODEPAGE_864 is not set
CONFIG_NLS_CODEPAGE_864=m
# CONFIG_NLS_CODEPAGE_865 is not set
CONFIG_NLS_CODEPAGE_865=m
# CONFIG_NLS_CODEPAGE_866 is not set
CONFIG_NLS_CODEPAGE_866=m
# CONFIG_NLS_CODEPAGE_869 is not set
CONFIG_NLS_CODEPAGE_869=m
# CONFIG_NLS_CODEPAGE_936 is not set
CONFIG_NLS_CODEPAGE_936=m
# CONFIG_NLS_CODEPAGE_950 is not set
CONFIG_NLS_CODEPAGE_950=m
# CONFIG_NLS_CODEPAGE_932 is not set
CONFIG_NLS_CODEPAGE_932=m
# CONFIG_NLS_CODEPAGE_949 is not set
CONFIG_NLS_CODEPAGE_949=m
# CONFIG_NLS_CODEPAGE_874 is not set
CONFIG_NLS_CODEPAGE_874=m
# CONFIG_NLS_ISO8859_8 is not set
CONFIG_NLS_ISO8859_8=m
# CONFIG_NLS_CODEPAGE_1250 is not set
CONFIG_NLS_CODEPAGE_1250=m
# CONFIG_NLS_CODEPAGE_1251 is not set
CONFIG_NLS_CODEPAGE_1251=m
# CONFIG_NLS_ISO8859_1 is not set
CONFIG_NLS_ASCII=m
# CONFIG_NLS_ISO8859_2 is not set
CONFIG_NLS_ISO8859_1=m
# CONFIG_NLS_ISO8859_3 is not set
CONFIG_NLS_ISO8859_2=m
# CONFIG_NLS_ISO8859_4 is not set
CONFIG_NLS_ISO8859_3=m
# CONFIG_NLS_ISO8859_5 is not set
CONFIG_NLS_ISO8859_4=m
# CONFIG_NLS_ISO8859_6 is not set
CONFIG_NLS_ISO8859_5=m
# CONFIG_NLS_ISO8859_7 is not set
CONFIG_NLS_ISO8859_6=m
# CONFIG_NLS_ISO8859_9 is not set
CONFIG_NLS_ISO8859_7=m
# CONFIG_NLS_ISO8859_13 is not set
CONFIG_NLS_ISO8859_9=m
# CONFIG_NLS_ISO8859_14 is not set
CONFIG_NLS_ISO8859_13=m
# CONFIG_NLS_ISO8859_15 is not set
CONFIG_NLS_ISO8859_14=m
# CONFIG_NLS_KOI8_R is not set
CONFIG_NLS_ISO8859_15=m
# CONFIG_NLS_KOI8_U is not set
CONFIG_NLS_KOI8_R=m
# CONFIG_NLS_UTF8 is not set
CONFIG_NLS_KOI8_U=m
CONFIG_NLS_UTF8=m
#
#
# Multimedia devices
# Multimedia devices
...
@@ -1349,6 +1367,7 @@ CONFIG_VIDEO_DPC=m
...
@@ -1349,6 +1367,7 @@ CONFIG_VIDEO_DPC=m
CONFIG_VIDEO_HEXIUM_ORION=m
CONFIG_VIDEO_HEXIUM_ORION=m
CONFIG_VIDEO_HEXIUM_GEMINI=m
CONFIG_VIDEO_HEXIUM_GEMINI=m
CONFIG_VIDEO_CX88=m
CONFIG_VIDEO_CX88=m
CONFIG_VIDEO_OVCAMCHIP=m
#
#
# Radio Adapters
# Radio Adapters
...
@@ -1544,6 +1563,7 @@ CONFIG_USB_ACM=m
...
@@ -1544,6 +1563,7 @@ CONFIG_USB_ACM=m
CONFIG_USB_PRINTER=m
CONFIG_USB_PRINTER=m
CONFIG_USB_STORAGE=m
CONFIG_USB_STORAGE=m
# CONFIG_USB_STORAGE_DEBUG is not set
# CONFIG_USB_STORAGE_DEBUG is not set
CONFIG_USB_STORAGE_RW_DETECT=y
# CONFIG_USB_STORAGE_DATAFAB is not set
# CONFIG_USB_STORAGE_DATAFAB is not set
CONFIG_USB_STORAGE_FREECOM=y
CONFIG_USB_STORAGE_FREECOM=y
CONFIG_USB_STORAGE_ISD200=y
CONFIG_USB_STORAGE_ISD200=y
...
@@ -1585,7 +1605,6 @@ CONFIG_USB_HPUSBSCSI=m
...
@@ -1585,7 +1605,6 @@ CONFIG_USB_HPUSBSCSI=m
# CONFIG_USB_IBMCAM is not set
# CONFIG_USB_IBMCAM is not set
# CONFIG_USB_KONICAWC is not set
# CONFIG_USB_KONICAWC is not set
# CONFIG_USB_OV511 is not set
# CONFIG_USB_OV511 is not set
CONFIG_USB_PWC=m
# CONFIG_USB_SE401 is not set
# CONFIG_USB_SE401 is not set
# CONFIG_USB_STV680 is not set
# CONFIG_USB_STV680 is not set
CONFIG_USB_W9968CF=m
CONFIG_USB_W9968CF=m
...
...
arch/sparc64/lib/find_bit.c
View file @
7e1ec8c8
...
@@ -6,9 +6,10 @@
...
@@ -6,9 +6,10 @@
* @offset: The bitnumber to start searching at
* @offset: The bitnumber to start searching at
* @size: The maximum size to search
* @size: The maximum size to search
*/
*/
unsigned
long
find_next_bit
(
unsigned
long
*
addr
,
unsigned
long
size
,
unsigned
long
offset
)
unsigned
long
find_next_bit
(
const
unsigned
long
*
addr
,
unsigned
long
size
,
unsigned
long
offset
)
{
{
unsigned
long
*
p
=
addr
+
(
offset
>>
6
);
const
unsigned
long
*
p
=
addr
+
(
offset
>>
6
);
unsigned
long
result
=
offset
&
~
63UL
;
unsigned
long
result
=
offset
&
~
63UL
;
unsigned
long
tmp
;
unsigned
long
tmp
;
...
...
arch/v850/kernel/vmlinux.lds.S
View file @
7e1ec8c8
/*
/*
*
arch
/
v850
/
vmlinux
.
lds
.
S
--
kernel
linker
script
for
v850
platforms
*
arch
/
v850
/
vmlinux
.
lds
.
S
--
kernel
linker
script
for
v850
platforms
*
*
*
Copyright
(
C
)
2002
,
03
NEC
Electronics
Corporation
*
Copyright
(
C
)
2002
,
03
,
04
NEC
Electronics
Corporation
*
Copyright
(
C
)
2002
,
03
Miles
Bader
<
miles
@
gnu
.
org
>
*
Copyright
(
C
)
2002
,
03
,
04
Miles
Bader
<
miles
@
gnu
.
org
>
*
*
*
This
file
is
subject
to
the
terms
and
conditions
of
the
GNU
General
*
This
file
is
subject
to
the
terms
and
conditions
of
the
GNU
General
*
Public
License
.
See
the
file
COPYING
in
the
main
directory
of
this
*
Public
License
.
See
the
file
COPYING
in
the
main
directory
of
this
...
@@ -65,7 +65,7 @@
...
@@ -65,7 +65,7 @@
#define TEXT_CONTENTS \
#define TEXT_CONTENTS \
__stext
=
.
; \
__stext
=
.
; \
*(.
text
)
\
*(.
text
)
\
SCHED_TEXT
SCHED_TEXT
\
*(.
exit.text
)
/*
2
.5
convention
*/
\
*(.
exit.text
)
/*
2
.5
convention
*/
\
*(.
text.exit
)
/*
2
.4
convention
*/
\
*(.
text.exit
)
/*
2
.4
convention
*/
\
*(.
text.lock
)
\
*(.
text.lock
)
\
...
...
drivers/ide/ide-disk.c
View file @
7e1ec8c8
...
@@ -1334,7 +1334,8 @@ enum {
...
@@ -1334,7 +1334,8 @@ enum {
idedisk_pm_flush_cache
=
ide_pm_state_start_suspend
,
idedisk_pm_flush_cache
=
ide_pm_state_start_suspend
,
idedisk_pm_standby
,
idedisk_pm_standby
,
idedisk_pm_restore_dma
=
ide_pm_state_start_resume
,
idedisk_pm_idle
=
ide_pm_state_start_resume
,
idedisk_pm_restore_dma
,
};
};
static
void
idedisk_complete_power_step
(
ide_drive_t
*
drive
,
struct
request
*
rq
,
u8
stat
,
u8
error
)
static
void
idedisk_complete_power_step
(
ide_drive_t
*
drive
,
struct
request
*
rq
,
u8
stat
,
u8
error
)
...
@@ -1349,6 +1350,9 @@ static void idedisk_complete_power_step (ide_drive_t *drive, struct request *rq,
...
@@ -1349,6 +1350,9 @@ static void idedisk_complete_power_step (ide_drive_t *drive, struct request *rq,
case
idedisk_pm_standby
:
/* Suspend step 2 (standby) complete */
case
idedisk_pm_standby
:
/* Suspend step 2 (standby) complete */
rq
->
pm
->
pm_step
=
ide_pm_state_completed
;
rq
->
pm
->
pm_step
=
ide_pm_state_completed
;
break
;
break
;
case
idedisk_pm_idle
:
/* Resume step 1 (idle) complete */
rq
->
pm
->
pm_step
=
idedisk_pm_restore_dma
;
break
;
}
}
}
}
...
@@ -1372,13 +1376,20 @@ static ide_startstop_t idedisk_start_power_step (ide_drive_t *drive, struct requ
...
@@ -1372,13 +1376,20 @@ static ide_startstop_t idedisk_start_power_step (ide_drive_t *drive, struct requ
args
->
command_type
=
IDE_DRIVE_TASK_NO_DATA
;
args
->
command_type
=
IDE_DRIVE_TASK_NO_DATA
;
args
->
handler
=
&
task_no_data_intr
;
args
->
handler
=
&
task_no_data_intr
;
return
do_rw_taskfile
(
drive
,
args
);
return
do_rw_taskfile
(
drive
,
args
);
case
idedisk_pm_standby
:
/* Suspend step 2 (standby) */
case
idedisk_pm_standby
:
/* Suspend step 2 (standby) */
args
->
tfRegister
[
IDE_COMMAND_OFFSET
]
=
WIN_STANDBYNOW1
;
args
->
tfRegister
[
IDE_COMMAND_OFFSET
]
=
WIN_STANDBYNOW1
;
args
->
command_type
=
IDE_DRIVE_TASK_NO_DATA
;
args
->
command_type
=
IDE_DRIVE_TASK_NO_DATA
;
args
->
handler
=
&
task_no_data_intr
;
args
->
handler
=
&
task_no_data_intr
;
return
do_rw_taskfile
(
drive
,
args
);
return
do_rw_taskfile
(
drive
,
args
);
case
idedisk_pm_restore_dma
:
/* Resume step 1 (restore DMA) */
case
idedisk_pm_idle
:
/* Resume step 1 (idle) */
args
->
tfRegister
[
IDE_COMMAND_OFFSET
]
=
WIN_IDLEIMMEDIATE
;
args
->
command_type
=
IDE_DRIVE_TASK_NO_DATA
;
args
->
handler
=
task_no_data_intr
;
return
do_rw_taskfile
(
drive
,
args
);
case
idedisk_pm_restore_dma
:
/* Resume step 2 (restore DMA) */
/*
/*
* Right now, all we do is call hwif->ide_dma_check(drive),
* Right now, all we do is call hwif->ide_dma_check(drive),
* we could be smarter and check for current xfer_speed
* we could be smarter and check for current xfer_speed
...
...
drivers/ide/legacy/ide-cs.c
View file @
7e1ec8c8
...
@@ -336,11 +336,6 @@ void ide_config(dev_link_t *link)
...
@@ -336,11 +336,6 @@ void ide_config(dev_link_t *link)
CS_CHECK
(
RequestIRQ
,
pcmcia_request_irq
(
handle
,
&
link
->
irq
));
CS_CHECK
(
RequestIRQ
,
pcmcia_request_irq
(
handle
,
&
link
->
irq
));
CS_CHECK
(
RequestConfiguration
,
pcmcia_request_configuration
(
handle
,
&
link
->
conf
));
CS_CHECK
(
RequestConfiguration
,
pcmcia_request_configuration
(
handle
,
&
link
->
conf
));
/* deal with brain dead IDE resource management */
release_region
(
link
->
io
.
BasePort1
,
link
->
io
.
NumPorts1
);
if
(
link
->
io
.
NumPorts2
)
release_region
(
link
->
io
.
BasePort2
,
link
->
io
.
NumPorts2
);
/* disable drive interrupts during IDE probe */
/* disable drive interrupts during IDE probe */
outb
(
0x02
,
ctl_base
);
outb
(
0x02
,
ctl_base
);
...
...
drivers/ide/pci/pdc202xx_old.c
View file @
7e1ec8c8
...
@@ -717,6 +717,12 @@ static unsigned int __devinit init_chipset_pdc202xx(struct pci_dev *dev, const c
...
@@ -717,6 +717,12 @@ static unsigned int __devinit init_chipset_pdc202xx(struct pci_dev *dev, const c
static
void
__devinit
init_hwif_pdc202xx
(
ide_hwif_t
*
hwif
)
static
void
__devinit
init_hwif_pdc202xx
(
ide_hwif_t
*
hwif
)
{
{
struct
pci_dev
*
dev
=
hwif
->
pci_dev
;
/* PDC20265 has problems with large LBA48 requests */
if
(
dev
->
device
==
PCI_DEVICE_ID_PROMISE_20265
)
hwif
->
rqsize
=
256
;
hwif
->
autodma
=
0
;
hwif
->
autodma
=
0
;
hwif
->
tuneproc
=
&
config_chipset_for_pio
;
hwif
->
tuneproc
=
&
config_chipset_for_pio
;
hwif
->
quirkproc
=
&
pdc202xx_quirkproc
;
hwif
->
quirkproc
=
&
pdc202xx_quirkproc
;
...
...
drivers/pcmcia/Kconfig
View file @
7e1ec8c8
...
@@ -69,6 +69,13 @@ config CARDBUS
...
@@ -69,6 +69,13 @@ config CARDBUS
depends on YENTA
depends on YENTA
default y if YENTA
default y if YENTA
config PD6729
tristate "Cirrus PD6729 compatible bridge support"
depends on PCMCIA && PCI
help
This provides support for the Cirrus PD6729 PCI-to-PCMCIA bridge
device, found in some older laptops and PCMCIA card readers.
config I82092
config I82092
tristate "i82092 compatible bridge support"
tristate "i82092 compatible bridge support"
depends on PCMCIA && PCI
depends on PCMCIA && PCI
...
...
drivers/pcmcia/Makefile
View file @
7e1ec8c8
...
@@ -9,6 +9,7 @@ endif
...
@@ -9,6 +9,7 @@ endif
obj-$(CONFIG_PCMCIA)
+=
pcmcia_core.o ds.o
obj-$(CONFIG_PCMCIA)
+=
pcmcia_core.o ds.o
obj-$(CONFIG_YENTA)
+=
yenta_socket.o
obj-$(CONFIG_YENTA)
+=
yenta_socket.o
obj-$(CONFIG_PD6729)
+=
pd6729.o
obj-$(CONFIG_I82365)
+=
i82365.o
obj-$(CONFIG_I82365)
+=
i82365.o
obj-$(CONFIG_I82092)
+=
i82092.o
obj-$(CONFIG_I82092)
+=
i82092.o
obj-$(CONFIG_TCIC)
+=
tcic.o
obj-$(CONFIG_TCIC)
+=
tcic.o
...
...
drivers/pcmcia/cistpl.c
View file @
7e1ec8c8
...
@@ -85,13 +85,15 @@ INT_MODULE_PARM(cis_width, 0); /* 16-bit CIS? */
...
@@ -85,13 +85,15 @@ INT_MODULE_PARM(cis_width, 0); /* 16-bit CIS? */
void
release_cis_mem
(
struct
pcmcia_socket
*
s
)
void
release_cis_mem
(
struct
pcmcia_socket
*
s
)
{
{
if
(
s
->
cis_mem
.
sys_start
!=
0
)
{
if
(
s
->
cis_mem
.
flags
&
MAP_ACTIVE
)
{
s
->
cis_mem
.
flags
&=
~
MAP_ACTIVE
;
s
->
cis_mem
.
flags
&=
~
MAP_ACTIVE
;
s
->
ops
->
set_mem_map
(
s
,
&
s
->
cis_mem
);
s
->
ops
->
set_mem_map
(
s
,
&
s
->
cis_mem
);
if
(
!
(
s
->
features
&
SS_CAP_STATIC_MAP
))
if
(
s
->
cis_mem
.
res
)
{
release_mem_region
(
s
->
cis_mem
.
sys_start
,
s
->
map_size
);
release_resource
(
s
->
cis_mem
.
res
);
kfree
(
s
->
cis_mem
.
res
);
s
->
cis_mem
.
res
=
NULL
;
}
iounmap
(
s
->
cis_virt
);
iounmap
(
s
->
cis_virt
);
s
->
cis_mem
.
sys_start
=
0
;
s
->
cis_virt
=
NULL
;
s
->
cis_virt
=
NULL
;
}
}
}
}
...
@@ -105,17 +107,16 @@ static unsigned char *
...
@@ -105,17 +107,16 @@ static unsigned char *
set_cis_map
(
struct
pcmcia_socket
*
s
,
unsigned
int
card_offset
,
unsigned
int
flags
)
set_cis_map
(
struct
pcmcia_socket
*
s
,
unsigned
int
card_offset
,
unsigned
int
flags
)
{
{
pccard_mem_map
*
mem
=
&
s
->
cis_mem
;
pccard_mem_map
*
mem
=
&
s
->
cis_mem
;
if
(
!
(
s
->
features
&
SS_CAP_STATIC_MAP
)
&&
if
(
!
(
s
->
features
&
SS_CAP_STATIC_MAP
)
&&
mem
->
res
==
NULL
)
{
mem
->
sys_start
==
0
)
{
mem
->
res
=
find_mem_region
(
0
,
s
->
map_size
,
s
->
map_size
,
0
,
validate_mem
(
s
);
"card services"
,
s
);
mem
->
sys_start
=
0
;
if
(
mem
->
res
==
NULL
)
{
if
(
find_mem_region
(
&
mem
->
sys_start
,
s
->
map_size
,
s
->
map_size
,
0
,
"card services"
,
s
))
{
printk
(
KERN_NOTICE
"cs: unable to map card memory!
\n
"
);
printk
(
KERN_NOTICE
"cs: unable to map card memory!
\n
"
);
return
NULL
;
return
NULL
;
}
}
mem
->
sys_stop
=
mem
->
sys_start
+
s
->
map_size
-
1
;
mem
->
sys_start
=
mem
->
res
->
start
;
s
->
cis_virt
=
ioremap
(
mem
->
sys_start
,
s
->
map_size
);
mem
->
sys_stop
=
mem
->
res
->
end
;
s
->
cis_virt
=
ioremap
(
mem
->
res
->
start
,
s
->
map_size
);
}
}
mem
->
card_start
=
card_offset
;
mem
->
card_start
=
card_offset
;
mem
->
flags
=
flags
;
mem
->
flags
=
flags
;
...
...
drivers/pcmcia/cs.c
View file @
7e1ec8c8
...
@@ -1100,8 +1100,8 @@ int pcmcia_get_window(window_handle_t *handle, int idx, win_req_t *req)
...
@@ -1100,8 +1100,8 @@ int pcmcia_get_window(window_handle_t *handle, int idx, win_req_t *req)
if
(
w
==
MAX_WIN
)
if
(
w
==
MAX_WIN
)
return
CS_NO_MORE_ITEMS
;
return
CS_NO_MORE_ITEMS
;
win
=
&
s
->
win
[
w
];
win
=
&
s
->
win
[
w
];
req
->
Base
=
win
->
ctl
.
sys_
start
;
req
->
Base
=
win
->
ctl
.
res
->
start
;
req
->
Size
=
win
->
ctl
.
sys_stop
-
win
->
ctl
.
sys_
start
+
1
;
req
->
Size
=
win
->
ctl
.
res
->
end
-
win
->
ctl
.
res
->
start
+
1
;
req
->
AccessSpeed
=
win
->
ctl
.
speed
;
req
->
AccessSpeed
=
win
->
ctl
.
speed
;
req
->
Attributes
=
0
;
req
->
Attributes
=
0
;
if
(
win
->
ctl
.
flags
&
MAP_ATTRIB
)
if
(
win
->
ctl
.
flags
&
MAP_ATTRIB
)
...
@@ -1548,8 +1548,11 @@ int pcmcia_release_window(window_handle_t win)
...
@@ -1548,8 +1548,11 @@ int pcmcia_release_window(window_handle_t win)
s
->
state
&=
~
SOCKET_WIN_REQ
(
win
->
index
);
s
->
state
&=
~
SOCKET_WIN_REQ
(
win
->
index
);
/* Release system memory */
/* Release system memory */
if
(
!
(
s
->
features
&
SS_CAP_STATIC_MAP
))
if
(
win
->
ctl
.
res
)
{
release_mem_region
(
win
->
base
,
win
->
size
);
release_resource
(
win
->
ctl
.
res
);
kfree
(
win
->
ctl
.
res
);
win
->
ctl
.
res
=
NULL
;
}
win
->
handle
->
state
&=
~
CLIENT_WIN_REQ
(
win
->
index
);
win
->
handle
->
state
&=
~
CLIENT_WIN_REQ
(
win
->
index
);
win
->
magic
=
0
;
win
->
magic
=
0
;
...
@@ -1871,14 +1874,19 @@ int pcmcia_request_window(client_handle_t *handle, win_req_t *req, window_handle
...
@@ -1871,14 +1874,19 @@ int pcmcia_request_window(client_handle_t *handle, win_req_t *req, window_handle
win
->
index
=
w
;
win
->
index
=
w
;
win
->
handle
=
*
handle
;
win
->
handle
=
*
handle
;
win
->
sock
=
s
;
win
->
sock
=
s
;
win
->
base
=
req
->
Base
;
win
->
size
=
req
->
Size
;
if
(
!
(
s
->
features
&
SS_CAP_STATIC_MAP
)
&&
if
(
!
(
s
->
features
&
SS_CAP_STATIC_MAP
))
{
find_mem_region
(
&
win
->
base
,
win
->
size
,
align
,
win
->
ctl
.
res
=
find_mem_region
(
req
->
Base
,
req
->
Size
,
align
,
(
req
->
Attributes
&
WIN_MAP_BELOW_1MB
),
(
req
->
Attributes
&
WIN_MAP_BELOW_1MB
),
(
*
handle
)
->
dev_info
,
s
))
(
*
handle
)
->
dev_info
,
s
);
return
CS_IN_USE
;
if
(
!
win
->
ctl
.
res
)
return
CS_IN_USE
;
win
->
ctl
.
sys_start
=
win
->
ctl
.
res
->
start
;
win
->
ctl
.
sys_stop
=
win
->
ctl
.
res
->
end
;
}
else
{
win
->
ctl
.
sys_start
=
req
->
Base
;
win
->
ctl
.
sys_stop
=
req
->
Base
+
req
->
Size
-
1
;
}
(
*
handle
)
->
state
|=
CLIENT_WIN_REQ
(
w
);
(
*
handle
)
->
state
|=
CLIENT_WIN_REQ
(
w
);
/* Configure the socket controller */
/* Configure the socket controller */
...
@@ -1893,8 +1901,6 @@ int pcmcia_request_window(client_handle_t *handle, win_req_t *req, window_handle
...
@@ -1893,8 +1901,6 @@ int pcmcia_request_window(client_handle_t *handle, win_req_t *req, window_handle
win
->
ctl
.
flags
|=
MAP_16BIT
;
win
->
ctl
.
flags
|=
MAP_16BIT
;
if
(
req
->
Attributes
&
WIN_USE_WAIT
)
if
(
req
->
Attributes
&
WIN_USE_WAIT
)
win
->
ctl
.
flags
|=
MAP_USE_WAIT
;
win
->
ctl
.
flags
|=
MAP_USE_WAIT
;
win
->
ctl
.
sys_start
=
win
->
base
;
win
->
ctl
.
sys_stop
=
win
->
base
+
win
->
size
-
1
;
win
->
ctl
.
card_start
=
0
;
win
->
ctl
.
card_start
=
0
;
if
(
s
->
ops
->
set_mem_map
(
s
,
&
win
->
ctl
)
!=
0
)
if
(
s
->
ops
->
set_mem_map
(
s
,
&
win
->
ctl
)
!=
0
)
return
CS_BAD_ARGS
;
return
CS_BAD_ARGS
;
...
...
drivers/pcmcia/cs_internal.h
View file @
7e1ec8c8
...
@@ -180,12 +180,12 @@ int write_memory(memory_handle_t handle, mem_op_t *req, caddr_t buf);
...
@@ -180,12 +180,12 @@ int write_memory(memory_handle_t handle, mem_op_t *req, caddr_t buf);
int
copy_memory
(
memory_handle_t
handle
,
copy_op_t
*
req
);
int
copy_memory
(
memory_handle_t
handle
,
copy_op_t
*
req
);
/* In rsrc_mgr */
/* In rsrc_mgr */
void
validate_mem
(
struct
pcmcia_socket
*
s
);
void
pcmcia_
validate_mem
(
struct
pcmcia_socket
*
s
);
struct
resource
*
find_io_region
(
unsigned
long
base
,
int
num
,
unsigned
long
align
,
struct
resource
*
find_io_region
(
unsigned
long
base
,
int
num
,
unsigned
long
align
,
char
*
name
,
struct
pcmcia_socket
*
s
);
char
*
name
,
struct
pcmcia_socket
*
s
);
int
adjust_io_region
(
struct
resource
*
res
,
unsigned
long
r_start
,
int
adjust_io_region
(
struct
resource
*
res
,
unsigned
long
r_start
,
unsigned
long
r_end
,
struct
pcmcia_socket
*
s
);
unsigned
long
r_end
,
struct
pcmcia_socket
*
s
);
int
find_mem_region
(
u_long
*
base
,
u_long
num
,
u_long
align
,
struct
resource
*
find_mem_region
(
u_long
base
,
u_long
num
,
u_long
align
,
int
low
,
char
*
name
,
struct
pcmcia_socket
*
s
);
int
low
,
char
*
name
,
struct
pcmcia_socket
*
s
);
int
try_irq
(
u_int
Attributes
,
int
irq
,
int
specific
);
int
try_irq
(
u_int
Attributes
,
int
irq
,
int
specific
);
void
undo_irq
(
u_int
Attributes
,
int
irq
);
void
undo_irq
(
u_int
Attributes
,
int
irq
);
...
...
drivers/pcmcia/ds.c
View file @
7e1ec8c8
...
@@ -941,6 +941,7 @@ static int ds_ioctl(struct inode * inode, struct file * file,
...
@@ -941,6 +941,7 @@ static int ds_ioctl(struct inode * inode, struct file * file,
ret
=
pcmcia_get_configuration_info
(
s
->
handle
,
&
buf
.
config
);
ret
=
pcmcia_get_configuration_info
(
s
->
handle
,
&
buf
.
config
);
break
;
break
;
case
DS_GET_FIRST_TUPLE
:
case
DS_GET_FIRST_TUPLE
:
pcmcia_validate_mem
(
s
->
parent
);
ret
=
pcmcia_get_first_tuple
(
s
->
handle
,
&
buf
.
tuple
);
ret
=
pcmcia_get_first_tuple
(
s
->
handle
,
&
buf
.
tuple
);
break
;
break
;
case
DS_GET_NEXT_TUPLE
:
case
DS_GET_NEXT_TUPLE
:
...
@@ -962,6 +963,7 @@ static int ds_ioctl(struct inode * inode, struct file * file,
...
@@ -962,6 +963,7 @@ static int ds_ioctl(struct inode * inode, struct file * file,
ret
=
pcmcia_get_status
(
s
->
handle
,
&
buf
.
status
);
ret
=
pcmcia_get_status
(
s
->
handle
,
&
buf
.
status
);
break
;
break
;
case
DS_VALIDATE_CIS
:
case
DS_VALIDATE_CIS
:
pcmcia_validate_mem
(
s
->
parent
);
ret
=
pcmcia_validate_cis
(
s
->
handle
,
&
buf
.
cisinfo
);
ret
=
pcmcia_validate_cis
(
s
->
handle
,
&
buf
.
cisinfo
);
break
;
break
;
case
DS_SUSPEND_CARD
:
case
DS_SUSPEND_CARD
:
...
...
drivers/pcmcia/i82092.c
View file @
7e1ec8c8
...
@@ -420,12 +420,12 @@ static void set_bridge_state(int sock)
...
@@ -420,12 +420,12 @@ static void set_bridge_state(int sock)
static
int
i82092aa_init
(
struct
pcmcia_socket
*
sock
)
static
int
i82092aa_init
(
struct
pcmcia_socket
*
sock
)
{
{
int
i
;
int
i
;
struct
resource
res
=
{
.
start
=
0
,
.
end
=
0x0fff
};
pccard_io_map
io
=
{
0
,
0
,
0
,
0
,
1
};
pccard_io_map
io
=
{
0
,
0
,
0
,
0
,
1
};
pccard_mem_map
mem
=
{
0
,
0
,
0
,
0
,
0
,
0
};
pccard_mem_map
mem
=
{
.
res
=
&
res
,
.
sys_stop
=
0x0fff
,
};
enter
(
"i82092aa_init"
);
enter
(
"i82092aa_init"
);
mem
.
sys_stop
=
0x0fff
;
for
(
i
=
0
;
i
<
2
;
i
++
)
{
for
(
i
=
0
;
i
<
2
;
i
++
)
{
io
.
map
=
i
;
io
.
map
=
i
;
i82092aa_set_io_map
(
sock
,
&
io
);
i82092aa_set_io_map
(
sock
,
&
io
);
...
...
drivers/pcmcia/i82365.c
View file @
7e1ec8c8
...
@@ -1307,10 +1307,10 @@ static int pcic_set_mem_map(struct pcmcia_socket *s, struct pccard_mem_map *mem)
...
@@ -1307,10 +1307,10 @@ static int pcic_set_mem_map(struct pcmcia_socket *s, struct pccard_mem_map *mem)
static
int
pcic_init
(
struct
pcmcia_socket
*
s
)
static
int
pcic_init
(
struct
pcmcia_socket
*
s
)
{
{
int
i
;
int
i
;
struct
resource
res
=
{
.
start
=
0
,
.
end
=
0x1000
};
pccard_io_map
io
=
{
0
,
0
,
0
,
0
,
1
};
pccard_io_map
io
=
{
0
,
0
,
0
,
0
,
1
};
pccard_mem_map
mem
=
{
0
,
0
,
0
,
0
,
0
,
0
};
pccard_mem_map
mem
=
{
.
res
=
&
res
,
.
sys_stop
=
0x1000
,
};
mem
.
sys_stop
=
0x1000
;
for
(
i
=
0
;
i
<
2
;
i
++
)
{
for
(
i
=
0
;
i
<
2
;
i
++
)
{
io
.
map
=
i
;
io
.
map
=
i
;
pcic_set_io_map
(
s
,
&
io
);
pcic_set_io_map
(
s
,
&
io
);
...
...
drivers/pcmcia/pd6729.c
0 → 100644
View file @
7e1ec8c8
/*
* Driver for the Cirrus PD6729 PCI-PCMCIA bridge.
*
* Based on the i82092.c driver.
*
* This software may be used and distributed according to the terms of
* the GNU General Public License, incorporated herein by reference.
*/
#include <linux/kernel.h>
#include <linux/config.h>
#include <linux/module.h>
#include <linux/pci.h>
#include <linux/init.h>
#include <linux/workqueue.h>
#include <linux/interrupt.h>
#include <linux/device.h>
#include <pcmcia/cs_types.h>
#include <pcmcia/ss.h>
#include <pcmcia/cs.h>
#include <asm/system.h>
#include <asm/io.h>
#include "pd6729.h"
#include "i82365.h"
#include "cirrus.h"
MODULE_LICENSE
(
"GPL"
);
#define MAX_SOCKETS 2
/* simple helper functions */
/* External clock time, in nanoseconds. 120 ns = 8.33 MHz */
#define to_cycles(ns) ((ns)/120)
static
spinlock_t
port_lock
=
SPIN_LOCK_UNLOCKED
;
/* basic value read/write functions */
static
unsigned
char
indirect_read
(
struct
pd6729_socket
*
socket
,
unsigned
short
reg
)
{
unsigned
long
port
;
unsigned
char
val
;
unsigned
long
flags
;
spin_lock_irqsave
(
&
port_lock
,
flags
);
reg
+=
socket
->
number
*
0x40
;
port
=
socket
->
io_base
;
outb
(
reg
,
port
);
val
=
inb
(
port
+
1
);
spin_unlock_irqrestore
(
&
port_lock
,
flags
);
return
val
;
}
static
unsigned
short
indirect_read16
(
struct
pd6729_socket
*
socket
,
unsigned
short
reg
)
{
unsigned
long
port
;
unsigned
short
tmp
;
unsigned
long
flags
;
spin_lock_irqsave
(
&
port_lock
,
flags
);
reg
=
reg
+
socket
->
number
*
0x40
;
port
=
socket
->
io_base
;
outb
(
reg
,
port
);
tmp
=
inb
(
port
+
1
);
reg
++
;
outb
(
reg
,
port
);
tmp
=
tmp
|
(
inb
(
port
+
1
)
<<
8
);
spin_unlock_irqrestore
(
&
port_lock
,
flags
);
return
tmp
;
}
static
void
indirect_write
(
struct
pd6729_socket
*
socket
,
unsigned
short
reg
,
unsigned
char
value
)
{
unsigned
long
port
;
unsigned
long
flags
;
spin_lock_irqsave
(
&
port_lock
,
flags
);
reg
=
reg
+
socket
->
number
*
0x40
;
port
=
socket
->
io_base
;
outb
(
reg
,
port
);
outb
(
value
,
port
+
1
);
spin_unlock_irqrestore
(
&
port_lock
,
flags
);
}
static
void
indirect_setbit
(
struct
pd6729_socket
*
socket
,
unsigned
short
reg
,
unsigned
char
mask
)
{
unsigned
long
port
;
unsigned
char
val
;
unsigned
long
flags
;
spin_lock_irqsave
(
&
port_lock
,
flags
);
reg
=
reg
+
socket
->
number
*
0x40
;
port
=
socket
->
io_base
;
outb
(
reg
,
port
);
val
=
inb
(
port
+
1
);
val
|=
mask
;
outb
(
reg
,
port
);
outb
(
val
,
port
+
1
);
spin_unlock_irqrestore
(
&
port_lock
,
flags
);
}
static
void
indirect_resetbit
(
struct
pd6729_socket
*
socket
,
unsigned
short
reg
,
unsigned
char
mask
)
{
unsigned
long
port
;
unsigned
char
val
;
unsigned
long
flags
;
spin_lock_irqsave
(
&
port_lock
,
flags
);
reg
=
reg
+
socket
->
number
*
0x40
;
port
=
socket
->
io_base
;
outb
(
reg
,
port
);
val
=
inb
(
port
+
1
);
val
&=
~
mask
;
outb
(
reg
,
port
);
outb
(
val
,
port
+
1
);
spin_unlock_irqrestore
(
&
port_lock
,
flags
);
}
static
void
indirect_write16
(
struct
pd6729_socket
*
socket
,
unsigned
short
reg
,
unsigned
short
value
)
{
unsigned
long
port
;
unsigned
char
val
;
unsigned
long
flags
;
spin_lock_irqsave
(
&
port_lock
,
flags
);
reg
=
reg
+
socket
->
number
*
0x40
;
port
=
socket
->
io_base
;
outb
(
reg
,
port
);
val
=
value
&
255
;
outb
(
val
,
port
+
1
);
reg
++
;
outb
(
reg
,
port
);
val
=
value
>>
8
;
outb
(
val
,
port
+
1
);
spin_unlock_irqrestore
(
&
port_lock
,
flags
);
}
/* Interrupt handler functionality */
static
irqreturn_t
pd6729_interrupt
(
int
irq
,
void
*
dev
,
struct
pt_regs
*
regs
)
{
struct
pd6729_socket
*
socket
=
(
struct
pd6729_socket
*
)
dev
;
int
i
;
int
loopcount
=
0
;
int
handled
=
0
;
unsigned
int
events
,
active
=
0
;
while
(
1
)
{
loopcount
++
;
if
(
loopcount
>
20
)
{
printk
(
KERN_ERR
"pd6729: infinite eventloop in interrupt
\n
"
);
break
;
}
active
=
0
;
for
(
i
=
0
;
i
<
MAX_SOCKETS
;
i
++
)
{
unsigned
int
csc
;
/* card status change register */
csc
=
indirect_read
(
&
socket
[
i
],
I365_CSC
);
if
(
csc
==
0
)
/* no events on this socket */
continue
;
handled
=
1
;
events
=
0
;
if
(
csc
&
I365_CSC_DETECT
)
{
events
|=
SS_DETECT
;
dprintk
(
"Card detected in socket %i!
\n
"
,
i
);
}
if
(
indirect_read
(
&
socket
[
i
],
I365_INTCTL
)
&
I365_PC_IOCARD
)
{
/* For IO/CARDS, bit 0 means "read the card" */
events
|=
(
csc
&
I365_CSC_STSCHG
)
?
SS_STSCHG
:
0
;
}
else
{
/* Check for battery/ready events */
events
|=
(
csc
&
I365_CSC_BVD1
)
?
SS_BATDEAD
:
0
;
events
|=
(
csc
&
I365_CSC_BVD2
)
?
SS_BATWARN
:
0
;
events
|=
(
csc
&
I365_CSC_READY
)
?
SS_READY
:
0
;
}
if
(
events
)
{
pcmcia_parse_events
(
&
socket
[
i
].
socket
,
events
);
}
active
|=
events
;
}
if
(
active
==
0
)
/* no more events to handle */
break
;
}
return
IRQ_RETVAL
(
handled
);
}
/* socket functions */
static
void
set_bridge_state
(
struct
pd6729_socket
*
socket
)
{
indirect_write
(
socket
,
I365_GBLCTL
,
0x00
);
indirect_write
(
socket
,
I365_GENCTL
,
0x00
);
indirect_setbit
(
socket
,
I365_INTCTL
,
0x08
);
}
static
int
pd6729_get_status
(
struct
pcmcia_socket
*
sock
,
u_int
*
value
)
{
struct
pd6729_socket
*
socket
=
container_of
(
sock
,
struct
pd6729_socket
,
socket
);
unsigned
int
status
;
unsigned
int
data
;
struct
pd6729_socket
*
t
;
/* Interface Status Register */
status
=
indirect_read
(
socket
,
I365_STATUS
);
*
value
=
0
;
if
((
status
&
I365_CS_DETECT
)
==
I365_CS_DETECT
)
{
*
value
|=
SS_DETECT
;
}
/* IO cards have a different meaning of bits 0,1 */
/* Also notice the inverse-logic on the bits */
if
(
indirect_read
(
socket
,
I365_INTCTL
)
&
I365_PC_IOCARD
)
{
/* IO card */
if
(
!
(
status
&
I365_CS_STSCHG
))
*
value
|=
SS_STSCHG
;
}
else
{
/* non I/O card */
if
(
!
(
status
&
I365_CS_BVD1
))
*
value
|=
SS_BATDEAD
;
if
(
!
(
status
&
I365_CS_BVD2
))
*
value
|=
SS_BATWARN
;
}
if
(
status
&
I365_CS_WRPROT
)
*
value
|=
SS_WRPROT
;
/* card is write protected */
if
(
status
&
I365_CS_READY
)
*
value
|=
SS_READY
;
/* card is not busy */
if
(
status
&
I365_CS_POWERON
)
*
value
|=
SS_POWERON
;
/* power is applied to the card */
t
=
(
socket
->
number
)
?
socket
:
socket
+
1
;
indirect_write
(
t
,
PD67_EXT_INDEX
,
PD67_EXTERN_DATA
);
data
=
indirect_read16
(
t
,
PD67_EXT_DATA
);
*
value
|=
(
data
&
PD67_EXD_VS1
(
socket
->
number
))
?
0
:
SS_3VCARD
;
return
0
;
}
static
int
pd6729_get_socket
(
struct
pcmcia_socket
*
sock
,
socket_state_t
*
state
)
{
struct
pd6729_socket
*
socket
=
container_of
(
sock
,
struct
pd6729_socket
,
socket
);
unsigned
char
reg
,
vcc
,
vpp
;
state
->
flags
=
0
;
state
->
Vcc
=
0
;
state
->
Vpp
=
0
;
state
->
io_irq
=
0
;
state
->
csc_mask
=
0
;
/* First the power status of the socket */
/* PCTRL - Power Control Register */
reg
=
indirect_read
(
socket
,
I365_POWER
);
if
(
reg
&
I365_PWR_AUTO
)
state
->
flags
|=
SS_PWR_AUTO
;
/* Automatic Power Switch */
if
(
reg
&
I365_PWR_OUT
)
state
->
flags
|=
SS_OUTPUT_ENA
;
/* Output signals are enabled */
vcc
=
reg
&
I365_VCC_MASK
;
vpp
=
reg
&
I365_VPP1_MASK
;
if
(
reg
&
I365_VCC_5V
)
{
state
->
Vcc
=
(
indirect_read
(
socket
,
PD67_MISC_CTL_1
)
&
PD67_MC1_VCC_3V
)
?
33
:
50
;
if
(
vpp
==
I365_VPP1_5V
)
{
if
(
state
->
Vcc
==
50
)
state
->
Vpp
=
50
;
else
state
->
Vpp
=
33
;
}
if
(
vpp
==
I365_VPP1_12V
)
state
->
Vpp
=
120
;
}
/* Now the IO card, RESET flags and IO interrupt */
/* IGENC, Interrupt and General Control */
reg
=
indirect_read
(
socket
,
I365_INTCTL
);
if
((
reg
&
I365_PC_RESET
)
==
0
)
state
->
flags
|=
SS_RESET
;
if
(
reg
&
I365_PC_IOCARD
)
state
->
flags
|=
SS_IOCARD
;
/* This is an IO card */
/* Set the IRQ number */
state
->
io_irq
=
socket
->
socket
.
pci_irq
;
/* Card status change */
/* CSCICR, Card Status Change Interrupt Configuration */
reg
=
indirect_read
(
socket
,
I365_CSCINT
);
if
(
reg
&
I365_CSC_DETECT
)
state
->
csc_mask
|=
SS_DETECT
;
/* Card detect is enabled */
if
(
state
->
flags
&
SS_IOCARD
)
{
/* IO Cards behave different */
if
(
reg
&
I365_CSC_STSCHG
)
state
->
csc_mask
|=
SS_STSCHG
;
}
else
{
if
(
reg
&
I365_CSC_BVD1
)
state
->
csc_mask
|=
SS_BATDEAD
;
if
(
reg
&
I365_CSC_BVD2
)
state
->
csc_mask
|=
SS_BATWARN
;
if
(
reg
&
I365_CSC_READY
)
state
->
csc_mask
|=
SS_READY
;
}
return
0
;
}
static
int
pd6729_set_socket
(
struct
pcmcia_socket
*
sock
,
socket_state_t
*
state
)
{
struct
pd6729_socket
*
socket
=
container_of
(
sock
,
struct
pd6729_socket
,
socket
);
unsigned
char
reg
;
/* First, set the global controller options */
set_bridge_state
(
socket
);
/* Values for the IGENC register */
reg
=
0
;
/* The reset bit has "inverse" logic */
if
(
!
(
state
->
flags
&
SS_RESET
))
reg
=
reg
|
I365_PC_RESET
;
if
(
state
->
flags
&
SS_IOCARD
)
reg
=
reg
|
I365_PC_IOCARD
;
/* IGENC, Interrupt and General Control Register */
indirect_write
(
socket
,
I365_INTCTL
,
reg
);
/* Power registers */
reg
=
I365_PWR_NORESET
;
/* default: disable resetdrv on resume */
if
(
state
->
flags
&
SS_PWR_AUTO
)
{
dprintk
(
"Auto power
\n
"
);
reg
|=
I365_PWR_AUTO
;
/* automatic power mngmnt */
}
if
(
state
->
flags
&
SS_OUTPUT_ENA
)
{
dprintk
(
"Power Enabled
\n
"
);
reg
|=
I365_PWR_OUT
;
/* enable power */
}
switch
(
state
->
Vcc
)
{
case
0
:
break
;
case
33
:
dprintk
(
"setting voltage to Vcc to 3.3V on socket %i
\n
"
,
socket
->
number
);
reg
|=
I365_VCC_5V
;
indirect_setbit
(
socket
,
PD67_MISC_CTL_1
,
PD67_MC1_VCC_3V
);
break
;
case
50
:
dprintk
(
"setting voltage to Vcc to 5V on socket %i
\n
"
,
socket
->
number
);
reg
|=
I365_VCC_5V
;
indirect_resetbit
(
socket
,
PD67_MISC_CTL_1
,
PD67_MC1_VCC_3V
);
break
;
default:
dprintk
(
"pd6729: pd6729_set_socket called with invalid VCC power value: %i
\n
"
,
state
->
Vcc
);
return
-
EINVAL
;
}
switch
(
state
->
Vpp
)
{
case
0
:
dprintk
(
"not setting Vpp on socket %i
\n
"
,
socket
->
number
);
break
;
case
33
:
case
50
:
dprintk
(
"setting Vpp to Vcc for socket %i
\n
"
,
socket
->
number
);
reg
|=
I365_VPP1_5V
;
break
;
case
120
:
dprintk
(
"setting Vpp to 12.0
\n
"
);
reg
|=
I365_VPP1_12V
;
break
;
default:
dprintk
(
"pd6729: pd6729_set_socket called with invalid VPP power value: %i
\n
"
,
state
->
Vpp
);
return
-
EINVAL
;
}
/* only write if changed */
if
(
reg
!=
indirect_read
(
socket
,
I365_POWER
))
indirect_write
(
socket
,
I365_POWER
,
reg
);
/* Now, specifiy that all interrupts are to be done as PCI interrupts */
indirect_write
(
socket
,
PD67_EXT_INDEX
,
PD67_EXT_CTL_1
);
indirect_write
(
socket
,
PD67_EXT_DATA
,
PD67_EC1_INV_MGMT_IRQ
|
PD67_EC1_INV_CARD_IRQ
);
/* Enable specific interrupt events */
reg
=
0x00
;
if
(
state
->
csc_mask
&
SS_DETECT
)
{
reg
|=
I365_CSC_DETECT
;
}
if
(
state
->
flags
&
SS_IOCARD
)
{
if
(
state
->
csc_mask
&
SS_STSCHG
)
reg
|=
I365_CSC_STSCHG
;
}
else
{
if
(
state
->
csc_mask
&
SS_BATDEAD
)
reg
|=
I365_CSC_BVD1
;
if
(
state
->
csc_mask
&
SS_BATWARN
)
reg
|=
I365_CSC_BVD2
;
if
(
state
->
csc_mask
&
SS_READY
)
reg
|=
I365_CSC_READY
;
}
reg
|=
0x30
;
/* management IRQ: PCI INTA# = "irq 3" */
indirect_write
(
socket
,
I365_CSCINT
,
reg
);
reg
=
indirect_read
(
socket
,
I365_INTCTL
);
reg
|=
0x03
;
/* card IRQ: PCI INTA# = "irq 3" */
indirect_write
(
socket
,
I365_INTCTL
,
reg
);
/* now clear the (probably bogus) pending stuff by doing a dummy read */
(
void
)
indirect_read
(
socket
,
I365_CSC
);
return
0
;
}
static
int
pd6729_set_io_map
(
struct
pcmcia_socket
*
sock
,
struct
pccard_io_map
*
io
)
{
struct
pd6729_socket
*
socket
=
container_of
(
sock
,
struct
pd6729_socket
,
socket
);
unsigned
char
map
,
ioctl
;
map
=
io
->
map
;
/* Check error conditions */
if
(
map
>
1
)
{
dprintk
(
"pd6729_set_io_map with invalid map"
);
return
-
EINVAL
;
}
/* Turn off the window before changing anything */
if
(
indirect_read
(
socket
,
I365_ADDRWIN
)
&
I365_ENA_IO
(
map
))
indirect_resetbit
(
socket
,
I365_ADDRWIN
,
I365_ENA_IO
(
map
));
/* dprintk("set_io_map: Setting range to %x - %x\n", io->start, io->stop);*/
/* write the new values */
indirect_write16
(
socket
,
I365_IO
(
map
)
+
I365_W_START
,
io
->
start
);
indirect_write16
(
socket
,
I365_IO
(
map
)
+
I365_W_STOP
,
io
->
stop
);
ioctl
=
indirect_read
(
socket
,
I365_IOCTL
)
&
~
I365_IOCTL_MASK
(
map
);
if
(
io
->
flags
&
MAP_0WS
)
ioctl
|=
I365_IOCTL_0WS
(
map
);
if
(
io
->
flags
&
MAP_16BIT
)
ioctl
|=
I365_IOCTL_16BIT
(
map
);
if
(
io
->
flags
&
MAP_AUTOSZ
)
ioctl
|=
I365_IOCTL_IOCS16
(
map
);
indirect_write
(
socket
,
I365_IOCTL
,
ioctl
);
/* Turn the window back on if needed */
if
(
io
->
flags
&
MAP_ACTIVE
)
indirect_setbit
(
socket
,
I365_ADDRWIN
,
I365_ENA_IO
(
map
));
return
0
;
}
static
int
pd6729_set_mem_map
(
struct
pcmcia_socket
*
sock
,
struct
pccard_mem_map
*
mem
)
{
struct
pd6729_socket
*
socket
=
container_of
(
sock
,
struct
pd6729_socket
,
socket
);
unsigned
short
base
,
i
;
unsigned
char
map
;
map
=
mem
->
map
;
if
(
map
>
4
)
{
printk
(
"pd6729_set_mem_map: invalid map"
);
return
-
EINVAL
;
}
if
((
mem
->
sys_start
>
mem
->
sys_stop
)
||
(
mem
->
speed
>
1000
))
{
printk
(
"pd6729_set_mem_map: invalid address / speed"
);
/* printk("invalid mem map for socket %i : %lx to %lx with a start of %x\n",
sock, mem->sys_start, mem->sys_stop, mem->card_start); */
return
-
EINVAL
;
}
/* Turn off the window before changing anything */
if
(
indirect_read
(
socket
,
I365_ADDRWIN
)
&
I365_ENA_MEM
(
map
))
indirect_resetbit
(
socket
,
I365_ADDRWIN
,
I365_ENA_MEM
(
map
));
/* write the start address */
base
=
I365_MEM
(
map
);
i
=
(
mem
->
sys_start
>>
12
)
&
0x0fff
;
if
(
mem
->
flags
&
MAP_16BIT
)
i
|=
I365_MEM_16BIT
;
if
(
mem
->
flags
&
MAP_0WS
)
i
|=
I365_MEM_0WS
;
indirect_write16
(
socket
,
base
+
I365_W_START
,
i
);
/* write the stop address */
i
=
(
mem
->
sys_stop
>>
12
)
&
0x0fff
;
switch
(
to_cycles
(
mem
->
speed
))
{
case
0
:
break
;
case
1
:
i
|=
I365_MEM_WS0
;
break
;
case
2
:
i
|=
I365_MEM_WS1
;
break
;
default:
i
|=
I365_MEM_WS1
|
I365_MEM_WS0
;
break
;
}
indirect_write16
(
socket
,
base
+
I365_W_STOP
,
i
);
/* Take care of high byte */
indirect_write
(
socket
,
PD67_EXT_INDEX
,
PD67_MEM_PAGE
(
map
));
indirect_write
(
socket
,
PD67_EXT_DATA
,
mem
->
sys_start
>>
24
);
/* card start */
i
=
((
mem
->
card_start
-
mem
->
sys_start
)
>>
12
)
&
0x3fff
;
if
(
mem
->
flags
&
MAP_WRPROT
)
i
|=
I365_MEM_WRPROT
;
if
(
mem
->
flags
&
MAP_ATTRIB
)
{
/* dprintk("requesting attribute memory for socket %i\n",
socket->number);*/
i
|=
I365_MEM_REG
;
}
else
{
/* dprintk("requesting normal memory for socket %i\n",
socket->number);*/
}
indirect_write16
(
socket
,
base
+
I365_W_OFF
,
i
);
/* Enable the window if necessary */
if
(
mem
->
flags
&
MAP_ACTIVE
)
indirect_setbit
(
socket
,
I365_ADDRWIN
,
I365_ENA_MEM
(
map
));
return
0
;
}
static
int
pd6729_suspend
(
struct
pcmcia_socket
*
sock
)
{
return
pd6729_set_socket
(
sock
,
&
dead_socket
);
}
static
int
pd6729_init
(
struct
pcmcia_socket
*
sock
)
{
int
i
;
struct
resource
res
=
{
.
end
=
0x0fff
};
pccard_io_map
io
=
{
0
,
0
,
0
,
0
,
1
};
pccard_mem_map
mem
=
{
.
res
=
&
res
,
.
sys_stop
=
0x0fff
};
pd6729_set_socket
(
sock
,
&
dead_socket
);
for
(
i
=
0
;
i
<
2
;
i
++
)
{
io
.
map
=
i
;
pd6729_set_io_map
(
sock
,
&
io
);
}
for
(
i
=
0
;
i
<
5
;
i
++
)
{
mem
.
map
=
i
;
pd6729_set_mem_map
(
sock
,
&
mem
);
}
return
0
;
}
/* the pccard structure and its functions */
static
struct
pccard_operations
pd6729_operations
=
{
.
init
=
pd6729_init
,
.
suspend
=
pd6729_suspend
,
.
get_status
=
pd6729_get_status
,
.
get_socket
=
pd6729_get_socket
,
.
set_socket
=
pd6729_set_socket
,
.
set_io_map
=
pd6729_set_io_map
,
.
set_mem_map
=
pd6729_set_mem_map
,
};
static
int
__devinit
pd6729_pci_probe
(
struct
pci_dev
*
dev
,
const
struct
pci_device_id
*
id
)
{
int
i
,
j
,
ret
;
char
configbyte
;
struct
pd6729_socket
*
socket
;
socket
=
kmalloc
(
sizeof
(
struct
pd6729_socket
)
*
MAX_SOCKETS
,
GFP_KERNEL
);
if
(
!
socket
)
return
-
ENOMEM
;
memset
(
socket
,
0
,
sizeof
(
struct
pd6729_socket
)
*
MAX_SOCKETS
);
if
((
ret
=
pci_enable_device
(
dev
)))
goto
err_out_free_mem
;
printk
(
KERN_INFO
"pd6729: Cirrus PD6729 PCI to PCMCIA Bridge at 0x%lx on irq %d
\n
"
,
pci_resource_start
(
dev
,
0
),
dev
->
irq
);
printk
(
KERN_INFO
"pd6729: configured as a %d socket device.
\n
"
,
MAX_SOCKETS
);
/* Since we have no memory BARs some firmware we may not
have had PCI_COMMAND_MEM enabled, yet the device needs
it. */
pci_read_config_byte
(
dev
,
PCI_COMMAND
,
&
configbyte
);
if
(
!
(
configbyte
&
PCI_COMMAND_MEMORY
))
{
printk
(
KERN_DEBUG
"pd6729: Enabling PCI_COMMAND_MEMORY.
\n
"
);
configbyte
|=
PCI_COMMAND_MEMORY
;
pci_write_config_byte
(
dev
,
PCI_COMMAND
,
configbyte
);
}
ret
=
pci_request_regions
(
dev
,
"pd6729"
);
if
(
ret
)
{
printk
(
KERN_INFO
"pd6729: pci request region failed.
\n
"
);
goto
err_out_disable
;
}
for
(
i
=
0
;
i
<
MAX_SOCKETS
;
i
++
)
{
socket
[
i
].
io_base
=
pci_resource_start
(
dev
,
0
);
socket
[
i
].
socket
.
features
|=
SS_CAP_PCCARD
;
socket
[
i
].
socket
.
map_size
=
0x1000
;
socket
[
i
].
socket
.
irq_mask
=
0
;
socket
[
i
].
socket
.
pci_irq
=
dev
->
irq
;
socket
[
i
].
socket
.
owner
=
THIS_MODULE
;
socket
[
i
].
number
=
i
;
socket
[
i
].
socket
.
ops
=
&
pd6729_operations
;
socket
[
i
].
socket
.
dev
.
dev
=
&
dev
->
dev
;
socket
[
i
].
socket
.
driver_data
=
&
socket
[
i
];
}
pci_set_drvdata
(
dev
,
socket
);
/* Register the interrupt handler */
if
((
ret
=
request_irq
(
dev
->
irq
,
pd6729_interrupt
,
SA_SHIRQ
,
"pd6729"
,
socket
)))
{
printk
(
KERN_ERR
"pd6729: Failed to register irq %d, aborting
\n
"
,
dev
->
irq
);
goto
err_out_free_res
;
}
for
(
i
=
0
;
i
<
MAX_SOCKETS
;
i
++
)
{
ret
=
pcmcia_register_socket
(
&
socket
[
i
].
socket
);
if
(
ret
)
{
printk
(
KERN_INFO
"pd6729: pcmcia_register_socket failed.
\n
"
);
for
(
j
=
0
;
j
<
i
;
j
++
)
pcmcia_unregister_socket
(
&
socket
[
j
].
socket
);
goto
err_out_free_res2
;
}
}
return
0
;
err_out_free_res2:
free_irq
(
dev
->
irq
,
socket
);
err_out_free_res:
pci_release_regions
(
dev
);
err_out_disable:
pci_disable_device
(
dev
);
err_out_free_mem:
kfree
(
socket
);
return
ret
;
}
static
void
__devexit
pd6729_pci_remove
(
struct
pci_dev
*
dev
)
{
int
i
;
struct
pd6729_socket
*
socket
=
pci_get_drvdata
(
dev
);
for
(
i
=
0
;
i
<
MAX_SOCKETS
;
i
++
)
pcmcia_unregister_socket
(
&
socket
[
i
].
socket
);
free_irq
(
dev
->
irq
,
socket
);
pci_release_regions
(
dev
);
pci_disable_device
(
dev
);
kfree
(
socket
);
}
static
int
pd6729_socket_suspend
(
struct
pci_dev
*
dev
,
u32
state
)
{
return
pcmcia_socket_dev_suspend
(
&
dev
->
dev
,
state
);
}
static
int
pd6729_socket_resume
(
struct
pci_dev
*
dev
)
{
return
pcmcia_socket_dev_resume
(
&
dev
->
dev
);
}
static
struct
pci_device_id
pd6729_pci_ids
[]
=
{
{
.
vendor
=
PCI_VENDOR_ID_CIRRUS
,
.
device
=
PCI_DEVICE_ID_CIRRUS_6729
,
.
subvendor
=
PCI_ANY_ID
,
.
subdevice
=
PCI_ANY_ID
,
},
{
}
};
MODULE_DEVICE_TABLE
(
pci
,
pd6729_pci_ids
);
static
struct
pci_driver
pd6729_pci_drv
=
{
.
name
=
"pd6729"
,
.
id_table
=
pd6729_pci_ids
,
.
probe
=
pd6729_pci_probe
,
.
remove
=
__devexit_p
(
pd6729_pci_remove
),
.
suspend
=
pd6729_socket_suspend
,
.
resume
=
pd6729_socket_resume
,
};
static
int
pd6729_module_init
(
void
)
{
return
pci_module_init
(
&
pd6729_pci_drv
);
}
static
void
pd6729_module_exit
(
void
)
{
pci_unregister_driver
(
&
pd6729_pci_drv
);
}
module_init
(
pd6729_module_init
);
module_exit
(
pd6729_module_exit
);
drivers/pcmcia/pd6729.h
0 → 100644
View file @
7e1ec8c8
#ifndef _INCLUDE_GUARD_PD6729_H_
#define _INCLUDE_GUARD_PD6729_H_
/* Debuging defines */
#ifdef NOTRACE
#define dprintk(fmt, args...) printk(fmt , ## args)
#else
#define dprintk(fmt, args...) do {} while (0)
#endif
/* Flags for I365_GENCTL */
#define I365_DF_VS1 0x40
/* DF-step Voltage Sense */
#define I365_DF_VS2 0x80
/* Fields in PD67_EXTERN_DATA */
#define PD67_EXD_VS1(s) (0x01 << ((s) << 1))
#define PD67_EXD_VS2(s) (0x02 << ((s) << 1))
struct
pd6729_socket
{
int
number
;
unsigned
long
io_base
;
/* base io address of the socket */
struct
pcmcia_socket
socket
;
};
#endif
drivers/pcmcia/rsrc_mgr.c
View file @
7e1ec8c8
...
@@ -118,7 +118,7 @@ make_resource(unsigned long b, unsigned long n, int flags, char *name)
...
@@ -118,7 +118,7 @@ make_resource(unsigned long b, unsigned long n, int flags, char *name)
res
->
name
=
name
;
res
->
name
=
name
;
res
->
start
=
b
;
res
->
start
=
b
;
res
->
end
=
b
+
n
-
1
;
res
->
end
=
b
+
n
-
1
;
res
->
flags
=
flags
|
IORESOURCE_BUSY
;
res
->
flags
=
flags
;
}
}
return
res
;
return
res
;
}
}
...
@@ -303,6 +303,7 @@ static int readable(struct pcmcia_socket *s, struct resource *res, cisinfo_t *in
...
@@ -303,6 +303,7 @@ static int readable(struct pcmcia_socket *s, struct resource *res, cisinfo_t *in
s
->
cis_mem
.
sys_start
=
res
->
start
;
s
->
cis_mem
.
sys_start
=
res
->
start
;
s
->
cis_mem
.
sys_stop
=
res
->
end
;
s
->
cis_mem
.
sys_stop
=
res
->
end
;
s
->
cis_mem
.
res
=
res
;
s
->
cis_virt
=
ioremap
(
res
->
start
,
s
->
map_size
);
s
->
cis_virt
=
ioremap
(
res
->
start
,
s
->
map_size
);
if
(
s
->
cis_virt
)
{
if
(
s
->
cis_virt
)
{
ret
=
pcmcia_validate_cis
(
s
->
clients
,
info
);
ret
=
pcmcia_validate_cis
(
s
->
clients
,
info
);
...
@@ -313,6 +314,7 @@ static int readable(struct pcmcia_socket *s, struct resource *res, cisinfo_t *in
...
@@ -313,6 +314,7 @@ static int readable(struct pcmcia_socket *s, struct resource *res, cisinfo_t *in
}
}
s
->
cis_mem
.
sys_start
=
0
;
s
->
cis_mem
.
sys_start
=
0
;
s
->
cis_mem
.
sys_stop
=
0
;
s
->
cis_mem
.
sys_stop
=
0
;
s
->
cis_mem
.
res
=
NULL
;
if
((
ret
!=
0
)
||
(
info
->
Chains
==
0
))
if
((
ret
!=
0
)
||
(
info
->
Chains
==
0
))
return
0
;
return
0
;
return
1
;
return
1
;
...
@@ -332,6 +334,7 @@ static int checksum(struct pcmcia_socket *s, struct resource *res)
...
@@ -332,6 +334,7 @@ static int checksum(struct pcmcia_socket *s, struct resource *res)
map
.
speed
=
0
;
map
.
speed
=
0
;
map
.
sys_start
=
res
->
start
;
map
.
sys_start
=
res
->
start
;
map
.
sys_stop
=
res
->
end
;
map
.
sys_stop
=
res
->
end
;
map
.
res
=
res
;
map
.
card_start
=
0
;
map
.
card_start
=
0
;
s
->
ops
->
set_mem_map
(
s
,
&
map
);
s
->
ops
->
set_mem_map
(
s
,
&
map
);
...
@@ -454,7 +457,7 @@ static u_long inv_probe(resource_map_t *m, struct pcmcia_socket *s)
...
@@ -454,7 +457,7 @@ static u_long inv_probe(resource_map_t *m, struct pcmcia_socket *s)
return
do_mem_probe
(
m
->
base
,
m
->
num
,
s
);
return
do_mem_probe
(
m
->
base
,
m
->
num
,
s
);
}
}
void
validate_mem
(
struct
pcmcia_socket
*
s
)
static
void
validate_mem
(
struct
pcmcia_socket
*
s
)
{
{
resource_map_t
*
m
,
mm
;
resource_map_t
*
m
,
mm
;
static
u_char
order
[]
=
{
0xd0
,
0xe0
,
0xc0
,
0xf0
};
static
u_char
order
[]
=
{
0xd0
,
0xe0
,
0xc0
,
0xf0
};
...
@@ -462,9 +465,6 @@ void validate_mem(struct pcmcia_socket *s)
...
@@ -462,9 +465,6 @@ void validate_mem(struct pcmcia_socket *s)
u_long
b
,
i
,
ok
=
0
;
u_long
b
,
i
,
ok
=
0
;
int
force_low
=
!
(
s
->
features
&
SS_CAP_PAGE_REGS
);
int
force_low
=
!
(
s
->
features
&
SS_CAP_PAGE_REGS
);
if
(
!
probe_mem
)
return
;
down
(
&
rsrc_sem
);
down
(
&
rsrc_sem
);
/* We do up to four passes through the list */
/* We do up to four passes through the list */
if
(
!
force_low
)
{
if
(
!
force_low
)
{
...
@@ -500,12 +500,12 @@ void validate_mem(struct pcmcia_socket *s)
...
@@ -500,12 +500,12 @@ void validate_mem(struct pcmcia_socket *s)
#else
/* CONFIG_PCMCIA_PROBE */
#else
/* CONFIG_PCMCIA_PROBE */
void
validate_mem
(
struct
pcmcia_socket
*
s
)
static
void
validate_mem
(
struct
pcmcia_socket
*
s
)
{
{
resource_map_t
*
m
,
mm
;
resource_map_t
*
m
,
mm
;
static
int
done
=
0
;
static
int
done
=
0
;
if
(
probe_mem
&&
done
++
==
0
)
{
if
(
done
++
==
0
)
{
down
(
&
rsrc_sem
);
down
(
&
rsrc_sem
);
for
(
m
=
mem_db
.
next
;
m
!=
&
mem_db
;
m
=
mm
.
next
)
{
for
(
m
=
mem_db
.
next
;
m
!=
&
mem_db
;
m
=
mm
.
next
)
{
mm
=
*
m
;
mm
=
*
m
;
...
@@ -518,6 +518,18 @@ void validate_mem(struct pcmcia_socket *s)
...
@@ -518,6 +518,18 @@ void validate_mem(struct pcmcia_socket *s)
#endif
/* CONFIG_PCMCIA_PROBE */
#endif
/* CONFIG_PCMCIA_PROBE */
void
pcmcia_validate_mem
(
struct
pcmcia_socket
*
s
)
{
down
(
&
s
->
skt_sem
);
if
(
probe_mem
&&
s
->
state
&
SOCKET_PRESENT
)
validate_mem
(
s
);
up
(
&
s
->
skt_sem
);
}
EXPORT_SYMBOL
(
pcmcia_validate_mem
);
struct
pcmcia_align_data
{
struct
pcmcia_align_data
{
unsigned
long
mask
;
unsigned
long
mask
;
unsigned
long
offset
;
unsigned
long
offset
;
...
@@ -622,7 +634,7 @@ int adjust_io_region(struct resource *res, unsigned long r_start,
...
@@ -622,7 +634,7 @@ int adjust_io_region(struct resource *res, unsigned long r_start,
struct
resource
*
find_io_region
(
unsigned
long
base
,
int
num
,
struct
resource
*
find_io_region
(
unsigned
long
base
,
int
num
,
unsigned
long
align
,
char
*
name
,
struct
pcmcia_socket
*
s
)
unsigned
long
align
,
char
*
name
,
struct
pcmcia_socket
*
s
)
{
{
struct
resource
*
res
=
make_resource
(
0
,
num
,
IORESOURCE_IO
,
name
);
struct
resource
*
res
=
make_resource
(
0
,
num
,
IORESOURCE_IO
,
s
->
dev
.
class_id
);
struct
pcmcia_align_data
data
;
struct
pcmcia_align_data
data
;
unsigned
long
min
=
base
;
unsigned
long
min
=
base
;
int
ret
;
int
ret
;
...
@@ -641,8 +653,8 @@ struct resource *find_io_region(unsigned long base, int num,
...
@@ -641,8 +653,8 @@ struct resource *find_io_region(unsigned long base, int num,
min
,
0
,
pcmcia_align
,
&
data
);
min
,
0
,
pcmcia_align
,
&
data
);
}
else
}
else
#endif
#endif
ret
=
allocate_resource
(
&
ioport_resource
,
res
,
num
,
min
,
~
0UL
,
0
,
ret
=
allocate_resource
(
&
ioport_resource
,
res
,
num
,
min
,
~
0UL
,
pcmcia_align
,
&
data
);
1
,
pcmcia_align
,
&
data
);
up
(
&
rsrc_sem
);
up
(
&
rsrc_sem
);
if
(
ret
!=
0
)
{
if
(
ret
!=
0
)
{
...
@@ -652,10 +664,10 @@ struct resource *find_io_region(unsigned long base, int num,
...
@@ -652,10 +664,10 @@ struct resource *find_io_region(unsigned long base, int num,
return
res
;
return
res
;
}
}
int
find_mem_region
(
u_long
*
base
,
u_long
num
,
u_long
align
,
struct
resource
*
find_mem_region
(
u_long
base
,
u_long
num
,
u_long
align
,
int
low
,
char
*
name
,
struct
pcmcia_socket
*
s
)
int
low
,
char
*
name
,
struct
pcmcia_socket
*
s
)
{
{
struct
resource
*
res
=
make_resource
(
0
,
num
,
IORESOURCE_MEM
,
name
);
struct
resource
*
res
=
make_resource
(
0
,
num
,
IORESOURCE_MEM
,
s
->
dev
.
class_id
);
struct
pcmcia_align_data
data
;
struct
pcmcia_align_data
data
;
unsigned
long
min
,
max
;
unsigned
long
min
,
max
;
int
ret
,
i
;
int
ret
,
i
;
...
@@ -663,16 +675,16 @@ int find_mem_region(u_long *base, u_long num, u_long align,
...
@@ -663,16 +675,16 @@ int find_mem_region(u_long *base, u_long num, u_long align,
low
=
low
||
!
(
s
->
features
&
SS_CAP_PAGE_REGS
);
low
=
low
||
!
(
s
->
features
&
SS_CAP_PAGE_REGS
);
data
.
mask
=
align
-
1
;
data
.
mask
=
align
-
1
;
data
.
offset
=
*
base
&
data
.
mask
;
data
.
offset
=
base
&
data
.
mask
;
data
.
map
=
&
mem_db
;
data
.
map
=
&
mem_db
;
for
(
i
=
0
;
i
<
2
;
i
++
)
{
for
(
i
=
0
;
i
<
2
;
i
++
)
{
if
(
low
)
{
if
(
low
)
{
max
=
0x100000UL
;
max
=
0x100000UL
;
min
=
*
base
<
max
?
*
base
:
0
;
min
=
base
<
max
?
base
:
0
;
}
else
{
}
else
{
max
=
~
0UL
;
max
=
~
0UL
;
min
=
0x100000UL
+
*
base
;
min
=
0x100000UL
+
base
;
}
}
down
(
&
rsrc_sem
);
down
(
&
rsrc_sem
);
...
@@ -684,7 +696,7 @@ int find_mem_region(u_long *base, u_long num, u_long align,
...
@@ -684,7 +696,7 @@ int find_mem_region(u_long *base, u_long num, u_long align,
}
else
}
else
#endif
#endif
ret
=
allocate_resource
(
&
iomem_resource
,
res
,
num
,
min
,
ret
=
allocate_resource
(
&
iomem_resource
,
res
,
num
,
min
,
max
,
0
,
pcmcia_align
,
&
data
);
max
,
1
,
pcmcia_align
,
&
data
);
up
(
&
rsrc_sem
);
up
(
&
rsrc_sem
);
if
(
ret
==
0
||
low
)
if
(
ret
==
0
||
low
)
break
;
break
;
...
@@ -693,10 +705,9 @@ int find_mem_region(u_long *base, u_long num, u_long align,
...
@@ -693,10 +705,9 @@ int find_mem_region(u_long *base, u_long num, u_long align,
if
(
ret
!=
0
)
{
if
(
ret
!=
0
)
{
kfree
(
res
);
kfree
(
res
);
}
else
{
res
=
NULL
;
*
base
=
res
->
start
;
}
}
return
re
t
;
return
re
s
;
}
}
/*======================================================================
/*======================================================================
...
...
drivers/pcmcia/tcic.c
View file @
7e1ec8c8
...
@@ -868,10 +868,10 @@ static int tcic_set_mem_map(struct pcmcia_socket *sock, struct pccard_mem_map *m
...
@@ -868,10 +868,10 @@ static int tcic_set_mem_map(struct pcmcia_socket *sock, struct pccard_mem_map *m
static
int
tcic_init
(
struct
pcmcia_socket
*
s
)
static
int
tcic_init
(
struct
pcmcia_socket
*
s
)
{
{
int
i
;
int
i
;
struct
resource
res
=
{
.
start
=
0
,
.
end
=
0x1000
};
pccard_io_map
io
=
{
0
,
0
,
0
,
0
,
1
};
pccard_io_map
io
=
{
0
,
0
,
0
,
0
,
1
};
pccard_mem_map
mem
=
{
0
,
0
,
0
,
0
,
0
,
0
};
pccard_mem_map
mem
=
{
.
res
=
&
res
,
.
sys_stop
=
0x1000
,
};
mem
.
sys_stop
=
0x1000
;
for
(
i
=
0
;
i
<
2
;
i
++
)
{
for
(
i
=
0
;
i
<
2
;
i
++
)
{
io
.
map
=
i
;
io
.
map
=
i
;
tcic_set_io_map
(
s
,
&
io
);
tcic_set_io_map
(
s
,
&
io
);
...
...
drivers/pcmcia/yenta_socket.c
View file @
7e1ec8c8
...
@@ -445,10 +445,10 @@ static void yenta_interrupt_wrapper(unsigned long data)
...
@@ -445,10 +445,10 @@ static void yenta_interrupt_wrapper(unsigned long data)
static
void
yenta_clear_maps
(
struct
yenta_socket
*
socket
)
static
void
yenta_clear_maps
(
struct
yenta_socket
*
socket
)
{
{
int
i
;
int
i
;
struct
resource
res
=
{
.
start
=
0
,
.
end
=
0x0fff
};
pccard_io_map
io
=
{
0
,
0
,
0
,
0
,
1
};
pccard_io_map
io
=
{
0
,
0
,
0
,
0
,
1
};
pccard_mem_map
mem
=
{
0
,
0
,
0
,
0
,
0
,
0
};
pccard_mem_map
mem
=
{
.
res
=
&
res
,
.
sys_stop
=
0x0fff
,
};
mem
.
sys_stop
=
0x0fff
;
yenta_set_socket
(
&
socket
->
socket
,
&
dead_socket
);
yenta_set_socket
(
&
socket
->
socket
,
&
dead_socket
);
for
(
i
=
0
;
i
<
2
;
i
++
)
{
for
(
i
=
0
;
i
<
2
;
i
++
)
{
io
.
map
=
i
;
io
.
map
=
i
;
...
...
fs/isofs/inode.c
View file @
7e1ec8c8
...
@@ -1265,31 +1265,14 @@ static void isofs_read_inode(struct inode * inode)
...
@@ -1265,31 +1265,14 @@ static void isofs_read_inode(struct inode * inode)
inode
->
i_size
=
isonum_733
(
de
->
size
);
inode
->
i_size
=
isonum_733
(
de
->
size
);
}
}
/*
* The ISO-9660 filesystem only stores 32 bits for file size.
* mkisofs handles files up to 2GB-2 = 2147483646 = 0x7FFFFFFE bytes
* in size. This is according to the large file summit paper from 1996.
* WARNING: ISO-9660 filesystems > 1 GB and even > 2 GB are fully
* legal. Do not prevent to use DVD's schilling@fokus.gmd.de
*/
if
((
inode
->
i_size
<
0
||
inode
->
i_size
>
0x7FFFFFFE
)
&&
sbi
->
s_cruft
==
'n'
)
{
printk
(
KERN_WARNING
"Warning: defective CD-ROM. "
"Enabling
\"
cruft
\"
mount option.
\n
"
);
sbi
->
s_cruft
=
'y'
;
}
/*
/*
* Some dipshit decided to store some other bit of information
* Some dipshit decided to store some other bit of information
* in the high byte of the file length. Catch this and holler.
* in the high byte of the file length. Truncate size in case
* WARNING: this will make it impossible for a file to be > 16MB
* this CDROM was mounted with the cruft option.
* on the CDROM.
*/
*/
if
(
sbi
->
s_cruft
==
'y'
&&
if
(
sbi
->
s_cruft
==
'y'
)
inode
->
i_size
&
0xff000000
)
{
inode
->
i_size
&=
0x00ffffff
;
inode
->
i_size
&=
0x00ffffff
;
}
if
(
de
->
interleave
[
0
])
{
if
(
de
->
interleave
[
0
])
{
printk
(
"Interleaved files not (yet) supported.
\n
"
);
printk
(
"Interleaved files not (yet) supported.
\n
"
);
...
...
include/asm-ppc/smp.h
View file @
7e1ec8c8
...
@@ -47,8 +47,6 @@ extern void smp_local_timer_interrupt(struct pt_regs *);
...
@@ -47,8 +47,6 @@ extern void smp_local_timer_interrupt(struct pt_regs *);
#define smp_processor_id() (current_thread_info()->cpu)
#define smp_processor_id() (current_thread_info()->cpu)
#define cpu_online(cpu) cpu_isset(cpu, cpu_online_map)
extern
int
__cpu_up
(
unsigned
int
cpu
);
extern
int
__cpu_up
(
unsigned
int
cpu
);
extern
int
smp_hw_index
[];
extern
int
smp_hw_index
[];
...
...
include/asm-ppc/system.h
View file @
7e1ec8c8
...
@@ -82,7 +82,6 @@ extern int fix_alignment(struct pt_regs *);
...
@@ -82,7 +82,6 @@ extern int fix_alignment(struct pt_regs *);
extern
void
cvt_fd
(
float
*
from
,
double
*
to
,
unsigned
long
*
fpscr
);
extern
void
cvt_fd
(
float
*
from
,
double
*
to
,
unsigned
long
*
fpscr
);
extern
void
cvt_df
(
double
*
from
,
float
*
to
,
unsigned
long
*
fpscr
);
extern
void
cvt_df
(
double
*
from
,
float
*
to
,
unsigned
long
*
fpscr
);
extern
int
call_rtas
(
const
char
*
,
int
,
int
,
unsigned
long
*
,
...);
extern
int
call_rtas
(
const
char
*
,
int
,
int
,
unsigned
long
*
,
...);
extern
int
abs
(
int
);
extern
void
cacheable_memzero
(
void
*
p
,
unsigned
int
nb
);
extern
void
cacheable_memzero
(
void
*
p
,
unsigned
int
nb
);
extern
int
do_page_fault
(
struct
pt_regs
*
,
unsigned
long
,
unsigned
long
);
extern
int
do_page_fault
(
struct
pt_regs
*
,
unsigned
long
,
unsigned
long
);
extern
void
bad_page_fault
(
struct
pt_regs
*
,
unsigned
long
,
int
);
extern
void
bad_page_fault
(
struct
pt_regs
*
,
unsigned
long
,
int
);
...
...
include/asm-sparc64/bitops.h
View file @
7e1ec8c8
...
@@ -204,7 +204,8 @@ static __inline__ unsigned int hweight8(unsigned int w)
...
@@ -204,7 +204,8 @@ static __inline__ unsigned int hweight8(unsigned int w)
* @offset: The bitnumber to start searching at
* @offset: The bitnumber to start searching at
* @size: The maximum size to search
* @size: The maximum size to search
*/
*/
extern
unsigned
long
find_next_bit
(
unsigned
long
*
,
unsigned
long
,
unsigned
long
);
extern
unsigned
long
find_next_bit
(
const
unsigned
long
*
,
unsigned
long
,
unsigned
long
);
/**
/**
* find_first_bit - find the first set bit in a memory region
* find_first_bit - find the first set bit in a memory region
...
...
include/asm-sparc64/byteorder.h
View file @
7e1ec8c8
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
#ifdef __GNUC__
#ifdef __GNUC__
static
__inline__
__u16
___arch__swab16p
(
__u16
*
addr
)
static
__inline__
__u16
___arch__swab16p
(
const
__u16
*
addr
)
{
{
__u16
ret
;
__u16
ret
;
...
@@ -17,7 +17,7 @@ static __inline__ __u16 ___arch__swab16p(__u16 *addr)
...
@@ -17,7 +17,7 @@ static __inline__ __u16 ___arch__swab16p(__u16 *addr)
return
ret
;
return
ret
;
}
}
static
__inline__
__u32
___arch__swab32p
(
__u32
*
addr
)
static
__inline__
__u32
___arch__swab32p
(
const
__u32
*
addr
)
{
{
__u32
ret
;
__u32
ret
;
...
@@ -27,7 +27,7 @@ static __inline__ __u32 ___arch__swab32p(__u32 *addr)
...
@@ -27,7 +27,7 @@ static __inline__ __u32 ___arch__swab32p(__u32 *addr)
return
ret
;
return
ret
;
}
}
static
__inline__
__u64
___arch__swab64p
(
__u64
*
addr
)
static
__inline__
__u64
___arch__swab64p
(
const
__u64
*
addr
)
{
{
__u64
ret
;
__u64
ret
;
...
...
include/asm-v850/bitops.h
View file @
7e1ec8c8
...
@@ -193,10 +193,86 @@ extern __inline__ int find_next_zero_bit (void *addr, int size, int offset)
...
@@ -193,10 +193,86 @@ extern __inline__ int find_next_zero_bit (void *addr, int size, int offset)
return
result
+
ffz
(
tmp
);
return
result
+
ffz
(
tmp
);
}
}
/* This is the same as generic_ffs, but we can't use that because it's
inline and the #include order mucks things up. */
static
inline
int
generic_ffs_for_find_next_bit
(
int
x
)
{
int
r
=
1
;
if
(
!
x
)
return
0
;
if
(
!
(
x
&
0xffff
))
{
x
>>=
16
;
r
+=
16
;
}
if
(
!
(
x
&
0xff
))
{
x
>>=
8
;
r
+=
8
;
}
if
(
!
(
x
&
0xf
))
{
x
>>=
4
;
r
+=
4
;
}
if
(
!
(
x
&
3
))
{
x
>>=
2
;
r
+=
2
;
}
if
(
!
(
x
&
1
))
{
x
>>=
1
;
r
+=
1
;
}
return
r
;
}
/*
* Find next one bit in a bitmap reasonably efficiently.
*/
static
__inline__
unsigned
long
find_next_bit
(
const
unsigned
long
*
addr
,
unsigned
long
size
,
unsigned
long
offset
)
{
unsigned
int
*
p
=
((
unsigned
int
*
)
addr
)
+
(
offset
>>
5
);
unsigned
int
result
=
offset
&
~
31UL
;
unsigned
int
tmp
;
if
(
offset
>=
size
)
return
size
;
size
-=
result
;
offset
&=
31UL
;
if
(
offset
)
{
tmp
=
*
p
++
;
tmp
&=
~
0UL
<<
offset
;
if
(
size
<
32
)
goto
found_first
;
if
(
tmp
)
goto
found_middle
;
size
-=
32
;
result
+=
32
;
}
while
(
size
>=
32
)
{
if
((
tmp
=
*
p
++
)
!=
0
)
goto
found_middle
;
result
+=
32
;
size
-=
32
;
}
if
(
!
size
)
return
result
;
tmp
=
*
p
;
found_first:
tmp
&=
~
0UL
>>
(
32
-
size
);
if
(
tmp
==
0UL
)
/* Are any bits set? */
return
result
+
size
;
/* Nope. */
found_middle:
return
result
+
generic_ffs_for_find_next_bit
(
tmp
);
}
#define ffs(x) generic_ffs (x)
#define ffs(x) generic_ffs (x)
#define fls(x) generic_fls (x)
#define fls(x) generic_fls (x)
#define __ffs(x) ffs(x)
#define __ffs(x) ffs(x)
/*
/*
* This is just `generic_ffs' from <linux/bitops.h>, except that it assumes
* This is just `generic_ffs' from <linux/bitops.h>, except that it assumes
* that at least one bit is set, and returns the real index of the bit
* that at least one bit is set, and returns the real index of the bit
...
...
include/asm-v850/irq.h
View file @
7e1ec8c8
/*
/*
* include/asm-v850/irq.h -- Machine interrupt handling
* include/asm-v850/irq.h -- Machine interrupt handling
*
*
* Copyright (C) 2001,02
NEC
Corporation
* Copyright (C) 2001,02
,04 NEC Electronics
Corporation
* Copyright (C) 2001,02 Miles Bader <miles@gnu.org>
* Copyright (C) 2001,02
,04
Miles Bader <miles@gnu.org>
*
*
* This file is subject to the terms and conditions of the GNU General
* This file is subject to the terms and conditions of the GNU General
* Public License. See the file COPYING in the main directory of this
* Public License. See the file COPYING in the main directory of this
...
@@ -62,11 +62,8 @@ extern void disable_irq (unsigned int irq);
...
@@ -62,11 +62,8 @@ extern void disable_irq (unsigned int irq);
/* Disable an irq without waiting. */
/* Disable an irq without waiting. */
extern
void
disable_irq_nosync
(
unsigned
int
irq
);
extern
void
disable_irq_nosync
(
unsigned
int
irq
);
extern
int
handle_IRQ_event
(
unsigned
int
,
struct
pt_regs
*
,
struct
irqaction
*
);
#endif
/* !__ASSEMBLY__ */
#endif
/* !__ASSEMBLY__ */
struct
irqaction
;
struct
pt_regs
;
int
handle_IRQ_event
(
unsigned
int
,
struct
pt_regs
*
,
struct
irqaction
*
);
#endif
/* __V850_IRQ_H__ */
#endif
/* __V850_IRQ_H__ */
include/asm-v850/unistd.h
View file @
7e1ec8c8
/*
/*
* include/asm-v850/unistd.h -- System call numbers and invocation mechanism
* include/asm-v850/unistd.h -- System call numbers and invocation mechanism
*
*
* Copyright (C) 2001,02,03 NEC Electronics Corporation
* Copyright (C) 2001,02,03
,04
NEC Electronics Corporation
* Copyright (C) 2001,02,03 Miles Bader <miles@gnu.org>
* Copyright (C) 2001,02,03
,04
Miles Bader <miles@gnu.org>
*
*
* This file is subject to the terms and conditions of the GNU General
* This file is subject to the terms and conditions of the GNU General
* Public License. See the file COPYING in the main directory of this
* Public License. See the file COPYING in the main directory of this
...
@@ -389,7 +389,6 @@ type name (atype a, btype b, ctype c, dtype d, etype e, ftype f) \
...
@@ -389,7 +389,6 @@ type name (atype a, btype b, ctype c, dtype d, etype e, ftype f) \
#ifdef __KERNEL__
#ifdef __KERNEL__
#define __ARCH_WANT_IPC_PARSE_VERSION
#define __ARCH_WANT_IPC_PARSE_VERSION
#define __ARCH_WANT_OLD_READDIR
#define __ARCH_WANT_OLD_READDIR
#define __ARCH_WANT_OLD_STAT
#define __ARCH_WANT_STAT64
#define __ARCH_WANT_STAT64
#define __ARCH_WANT_SYS_ALARM
#define __ARCH_WANT_SYS_ALARM
#define __ARCH_WANT_SYS_GETHOSTNAME
#define __ARCH_WANT_SYS_GETHOSTNAME
...
@@ -404,7 +403,6 @@ type name (atype a, btype b, ctype c, dtype d, etype e, ftype f) \
...
@@ -404,7 +403,6 @@ type name (atype a, btype b, ctype c, dtype d, etype e, ftype f) \
#define __ARCH_WANT_SYS_GETPGRP
#define __ARCH_WANT_SYS_GETPGRP
#define __ARCH_WANT_SYS_LLSEEK
#define __ARCH_WANT_SYS_LLSEEK
#define __ARCH_WANT_SYS_NICE
#define __ARCH_WANT_SYS_NICE
#define __ARCH_WANT_SYS_OLD_GETRLIMIT
#define __ARCH_WANT_SYS_OLDUMOUNT
#define __ARCH_WANT_SYS_OLDUMOUNT
#define __ARCH_WANT_SYS_SIGPENDING
#define __ARCH_WANT_SYS_SIGPENDING
#define __ARCH_WANT_SYS_SIGPROCMASK
#define __ARCH_WANT_SYS_SIGPROCMASK
...
...
include/linux/iso_fs.h
View file @
7e1ec8c8
...
@@ -190,28 +190,28 @@ static inline int isonum_712(char *p)
...
@@ -190,28 +190,28 @@ static inline int isonum_712(char *p)
{
{
return
*
(
s8
*
)
p
;
return
*
(
s8
*
)
p
;
}
}
static
inline
int
isonum_721
(
char
*
p
)
static
inline
unsigned
int
isonum_721
(
char
*
p
)
{
{
return
le16_to_cpu
(
get_unaligned
((
u16
*
)
p
));
return
le16_to_cpu
(
get_unaligned
((
u16
*
)
p
));
}
}
static
inline
int
isonum_722
(
char
*
p
)
static
inline
unsigned
int
isonum_722
(
char
*
p
)
{
{
return
be16_to_cpu
(
get_unaligned
((
u16
*
)
p
));
return
be16_to_cpu
(
get_unaligned
((
u16
*
)
p
));
}
}
static
inline
int
isonum_723
(
char
*
p
)
static
inline
unsigned
int
isonum_723
(
char
*
p
)
{
{
/* Ignore bigendian datum due to broken mastering programs */
/* Ignore bigendian datum due to broken mastering programs */
return
le16_to_cpu
(
get_unaligned
((
u16
*
)
p
));
return
le16_to_cpu
(
get_unaligned
((
u16
*
)
p
));
}
}
static
inline
int
isonum_731
(
char
*
p
)
static
inline
unsigned
int
isonum_731
(
char
*
p
)
{
{
return
le32_to_cpu
(
get_unaligned
((
u32
*
)
p
));
return
le32_to_cpu
(
get_unaligned
((
u32
*
)
p
));
}
}
static
inline
int
isonum_732
(
char
*
p
)
static
inline
unsigned
int
isonum_732
(
char
*
p
)
{
{
return
be32_to_cpu
(
get_unaligned
((
u32
*
)
p
));
return
be32_to_cpu
(
get_unaligned
((
u32
*
)
p
));
}
}
static
inline
int
isonum_733
(
char
*
p
)
static
inline
unsigned
int
isonum_733
(
char
*
p
)
{
{
/* Ignore bigendian datum due to broken mastering programs */
/* Ignore bigendian datum due to broken mastering programs */
return
le32_to_cpu
(
get_unaligned
((
u32
*
)
p
));
return
le32_to_cpu
(
get_unaligned
((
u32
*
)
p
));
...
...
include/pcmcia/ss.h
View file @
7e1ec8c8
...
@@ -105,6 +105,7 @@ typedef struct pccard_mem_map {
...
@@ -105,6 +105,7 @@ typedef struct pccard_mem_map {
u_short
speed
;
u_short
speed
;
u_long
sys_start
,
sys_stop
;
u_long
sys_start
,
sys_stop
;
u_int
card_start
;
u_int
card_start
;
struct
resource
*
res
;
}
pccard_mem_map
;
}
pccard_mem_map
;
typedef
struct
cb_bridge_map
{
typedef
struct
cb_bridge_map
{
...
@@ -154,8 +155,6 @@ typedef struct window_t {
...
@@ -154,8 +155,6 @@ typedef struct window_t {
u_short
index
;
u_short
index
;
client_handle_t
handle
;
client_handle_t
handle
;
struct
pcmcia_socket
*
sock
;
struct
pcmcia_socket
*
sock
;
u_long
base
;
u_long
size
;
pccard_mem_map
ctl
;
pccard_mem_map
ctl
;
}
window_t
;
}
window_t
;
...
...
init/Kconfig
View file @
7e1ec8c8
...
@@ -77,6 +77,7 @@ config SWAP
...
@@ -77,6 +77,7 @@ config SWAP
config SYSVIPC
config SYSVIPC
bool "System V IPC"
bool "System V IPC"
depends on MMU
---help---
---help---
Inter Process Communication is a suite of library functions and
Inter Process Communication is a suite of library functions and
system calls which let processes (running programs) synchronize and
system calls which let processes (running programs) synchronize and
...
...
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