Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lrg/voltage-2.6
Linus Torvalds [Tue, 14 Oct 2008 19:28:55 +0000 (12:28 -0700)]
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lrg/voltage-2.6: (26 commits)
  mfd: Fix warning in WM8350
  mfd: Add placeholders for WM8350 client devices
  da903x: add regulator support for DA9030/DA9034
  mfd: Add WM8350 subdevice registration helper
  regulator: Add WM8350 regulator support
  mfd: Add WM8350 interrupt support
  mfd: Add initialisation callback for WM8350
  mfd: Add GPIO pin configuration support for WM8350
  mfd: Add I2C control support for WM8350
  mfd: Core support for the WM8350 AudioPlus PMIC
  mfd: Add WM8350 watchdog register definitions
  mfd: Add WM8350 RTC register definitions
  mfd: Add WM8350 comparator register definitions
  mfd: Add WM8350 PMU register definitions
  mfd: Add WM8350 PMIC register definitions
  mfd: Add WM8350 GPIO register definitions
  mfd: Add WM8350 audio register definitions
  regulator: Export regulator name via sysfs
  regulator: Add WM8400 regulator support
  mfd: Core support for the WM8400 AudioPlus HiFi CODEC and PMU
  ...

650 files changed:
Documentation/laptops/disk-shock-protection.txt [new file with mode: 0644]
Documentation/pcmcia/driver-changes.txt
Documentation/video4linux/CARDLIST.bttv
Documentation/video4linux/CARDLIST.cx23885
Documentation/video4linux/CARDLIST.cx88
Documentation/video4linux/CARDLIST.em28xx
Documentation/video4linux/CARDLIST.saa7134
Documentation/video4linux/CARDLIST.tuner
Documentation/video4linux/gspca.txt
Documentation/video4linux/m5602.txt [new file with mode: 0644]
Documentation/video4linux/soc-camera.txt [new file with mode: 0644]
MAINTAINERS
arch/arm/mach-pxa/include/mach/camera.h
arch/m68k/Kconfig
arch/m68k/amiga/config.c
arch/m68k/atari/Makefile
arch/m68k/atari/ataints.c
arch/m68k/atari/atakeyb.c
arch/m68k/atari/config.c
arch/m68k/atari/hades-pci.c [deleted file]
arch/m68k/atari/time.c
arch/m68k/bvme6000/config.c
arch/m68k/bvme6000/rtc.c
arch/m68k/kernel/Makefile
arch/m68k/kernel/bios32.c [deleted file]
arch/m68k/kernel/dma.c
arch/m68k/kernel/ints.c
arch/m68k/kernel/process.c
arch/m68k/kernel/traps.c
arch/m68k/kernel/vmlinux-std.lds
arch/m68k/mm/kmap.c
arch/m68k/mvme16x/rtc.c
arch/m68k/q40/config.c
arch/m68k/sun3x/time.c
arch/mips/include/asm/mach-generic/ide.h
arch/xtensa/kernel/setup.c
drivers/ata/pata_pcmcia.c
drivers/block/ataflop.c
drivers/bluetooth/bluecard_cs.c
drivers/bluetooth/bt3c_cs.c
drivers/bluetooth/btuart_cs.c
drivers/bluetooth/dtl1_cs.c
drivers/char/pcmcia/cm4000_cs.c
drivers/char/pcmcia/cm4040_cs.c
drivers/char/pcmcia/ipwireless/main.c
drivers/char/pcmcia/synclink_cs.c
drivers/char/vt.c
drivers/ide/Kconfig
drivers/ide/Makefile
drivers/ide/arm/icside.c
drivers/ide/h8300/ide-h8300.c
drivers/ide/ide-acpi.c
drivers/ide/ide-atapi.c
drivers/ide/ide-cd.c
drivers/ide/ide-cd.h
drivers/ide/ide-disk.c
drivers/ide/ide-disk.h [new file with mode: 0644]
drivers/ide/ide-disk_ioctl.c [new file with mode: 0644]
drivers/ide/ide-disk_proc.c [new file with mode: 0644]
drivers/ide/ide-dma-sff.c [new file with mode: 0644]
drivers/ide/ide-dma.c
drivers/ide/ide-floppy.c
drivers/ide/ide-floppy.h
drivers/ide/ide-floppy_ioctl.c
drivers/ide/ide-floppy_proc.c [new file with mode: 0644]
drivers/ide/ide-generic.c
drivers/ide/ide-io.c
drivers/ide/ide-ioctls.c
drivers/ide/ide-iops.c
drivers/ide/ide-lib.c
drivers/ide/ide-park.c [new file with mode: 0644]
drivers/ide/ide-probe.c
drivers/ide/ide-proc.c
drivers/ide/ide-tape.c
drivers/ide/ide-taskfile.c
drivers/ide/ide.c
drivers/ide/legacy/ali14xx.c
drivers/ide/legacy/ht6560b.c
drivers/ide/legacy/ide-4drives.c
drivers/ide/legacy/ide-cs.c
drivers/ide/legacy/qd65xx.c
drivers/ide/mips/au1xxx-ide.c
drivers/ide/pci/aec62xx.c
drivers/ide/pci/alim15x3.c
drivers/ide/pci/amd74xx.c
drivers/ide/pci/atiixp.c
drivers/ide/pci/cmd640.c
drivers/ide/pci/cmd64x.c
drivers/ide/pci/cs5520.c
drivers/ide/pci/cs5530.c
drivers/ide/pci/cs5535.c
drivers/ide/pci/cy82c693.c
drivers/ide/pci/delkin_cb.c
drivers/ide/pci/generic.c
drivers/ide/pci/hpt34x.c
drivers/ide/pci/hpt366.c
drivers/ide/pci/it8213.c
drivers/ide/pci/it821x.c
drivers/ide/pci/jmicron.c
drivers/ide/pci/ns87415.c
drivers/ide/pci/opti621.c
drivers/ide/pci/pdc202xx_new.c
drivers/ide/pci/pdc202xx_old.c
drivers/ide/pci/piix.c
drivers/ide/pci/rz1000.c
drivers/ide/pci/sc1200.c
drivers/ide/pci/scc_pata.c
drivers/ide/pci/serverworks.c
drivers/ide/pci/sgiioc4.c
drivers/ide/pci/siimage.c
drivers/ide/pci/sis5513.c
drivers/ide/pci/sl82c105.c
drivers/ide/pci/slc90e66.c
drivers/ide/pci/tc86c001.c
drivers/ide/pci/triflex.c
drivers/ide/pci/trm290.c
drivers/ide/pci/via82cxxx.c
drivers/ide/ppc/pmac.c
drivers/input/misc/hp_sdc_rtc.c
drivers/input/serio/hp_sdc.c
drivers/isdn/hardware/avm/avm_cs.c
drivers/isdn/hisax/avma1_cs.c
drivers/isdn/hisax/elsa_cs.c
drivers/isdn/hisax/sedlbauer_cs.c
drivers/isdn/hisax/teles_cs.c
drivers/isdn/mISDN/dsp_cmx.c
drivers/isdn/mISDN/timerdev.c
drivers/md/Kconfig
drivers/media/common/ir-keymaps.c
drivers/media/common/saa7146_core.c
drivers/media/common/saa7146_fops.c
drivers/media/common/tuners/mt2060.c
drivers/media/common/tuners/mxl5007t.c
drivers/media/common/tuners/tda18271-fe.c
drivers/media/common/tuners/tda827x.c
drivers/media/common/tuners/tda827x.h
drivers/media/common/tuners/tda8290.c
drivers/media/common/tuners/tda8290.h
drivers/media/common/tuners/tda9887.c
drivers/media/common/tuners/tuner-simple.c
drivers/media/common/tuners/tuner-types.c
drivers/media/common/tuners/tuner-xc2028.c
drivers/media/common/tuners/tuner-xc2028.h
drivers/media/common/tuners/xc5000.c
drivers/media/common/tuners/xc5000.h
drivers/media/common/tuners/xc5000_priv.h [deleted file]
drivers/media/dvb/Kconfig
drivers/media/dvb/Makefile
drivers/media/dvb/b2c2/flexcop-dma.c
drivers/media/dvb/bt8xx/dvb-bt8xx.c
drivers/media/dvb/cinergyT2/Kconfig [deleted file]
drivers/media/dvb/cinergyT2/Makefile [deleted file]
drivers/media/dvb/cinergyT2/cinergyT2.c [deleted file]
drivers/media/dvb/dm1105/Kconfig [new file with mode: 0644]
drivers/media/dvb/dm1105/Makefile [new file with mode: 0644]
drivers/media/dvb/dm1105/dm1105.c [new file with mode: 0644]
drivers/media/dvb/dvb-core/dvb_frontend.c
drivers/media/dvb/dvb-core/dvb_frontend.h
drivers/media/dvb/dvb-usb/Kconfig
drivers/media/dvb/dvb-usb/Makefile
drivers/media/dvb/dvb-usb/af9005-remote.c
drivers/media/dvb/dvb-usb/af9005-script.h
drivers/media/dvb/dvb-usb/af9005.c
drivers/media/dvb/dvb-usb/af9015.c [new file with mode: 0644]
drivers/media/dvb/dvb-usb/af9015.h [new file with mode: 0644]
drivers/media/dvb/dvb-usb/anysee.c
drivers/media/dvb/dvb-usb/cinergyT2-core.c [new file with mode: 0644]
drivers/media/dvb/dvb-usb/cinergyT2-fe.c [new file with mode: 0644]
drivers/media/dvb/dvb-usb/cinergyT2.h [new file with mode: 0644]
drivers/media/dvb/dvb-usb/cxusb.c
drivers/media/dvb/dvb-usb/dib0700.h
drivers/media/dvb/dvb-usb/dib0700_core.c
drivers/media/dvb/dvb-usb/dib0700_devices.c
drivers/media/dvb/dvb-usb/dtv5100.c [new file with mode: 0644]
drivers/media/dvb/dvb-usb/dtv5100.h [new file with mode: 0644]
drivers/media/dvb/dvb-usb/dvb-usb-ids.h
drivers/media/dvb/dvb-usb/dw2102.c
drivers/media/dvb/dvb-usb/dw2102.h
drivers/media/dvb/frontends/Kconfig
drivers/media/dvb/frontends/Makefile
drivers/media/dvb/frontends/af9013.c [new file with mode: 0644]
drivers/media/dvb/frontends/af9013.h [new file with mode: 0644]
drivers/media/dvb/frontends/af9013_priv.h [new file with mode: 0644]
drivers/media/dvb/frontends/au8522.c
drivers/media/dvb/frontends/au8522.h
drivers/media/dvb/frontends/cx24110.h
drivers/media/dvb/frontends/cx24116.c [new file with mode: 0644]
drivers/media/dvb/frontends/cx24116.h [new file with mode: 0644]
drivers/media/dvb/frontends/dib0070.h
drivers/media/dvb/frontends/dib7000m.c
drivers/media/dvb/frontends/dib7000p.c
drivers/media/dvb/frontends/dib7000p.h
drivers/media/dvb/frontends/drx397xD.c
drivers/media/dvb/frontends/drx397xD.h
drivers/media/dvb/frontends/dvb_dummy_fe.c
drivers/media/dvb/frontends/eds1547.h [new file with mode: 0644]
drivers/media/dvb/frontends/lgs8gl5.c [new file with mode: 0644]
drivers/media/dvb/frontends/lgs8gl5.h [new file with mode: 0644]
drivers/media/dvb/frontends/nxt200x.c
drivers/media/dvb/frontends/or51211.c
drivers/media/dvb/frontends/si21xx.c [new file with mode: 0644]
drivers/media/dvb/frontends/si21xx.h [new file with mode: 0644]
drivers/media/dvb/frontends/sp887x.c
drivers/media/dvb/frontends/stb6000.c [new file with mode: 0644]
drivers/media/dvb/frontends/stb6000.h [new file with mode: 0644]
drivers/media/dvb/frontends/stv0288.c [new file with mode: 0644]
drivers/media/dvb/frontends/stv0288.h [new file with mode: 0644]
drivers/media/dvb/frontends/stv0299.c
drivers/media/dvb/frontends/stv0299.h
drivers/media/dvb/frontends/tdhd1.h [new file with mode: 0644]
drivers/media/dvb/ttpci/Kconfig
drivers/media/dvb/ttpci/av7110.c
drivers/media/dvb/ttpci/av7110.h
drivers/media/dvb/ttpci/av7110_av.c
drivers/media/dvb/ttpci/budget-av.c
drivers/media/dvb/ttpci/budget-ci.c
drivers/media/dvb/ttpci/budget-core.c
drivers/media/dvb/ttpci/budget-patch.c
drivers/media/dvb/ttpci/budget.c
drivers/media/dvb/ttpci/budget.h
drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c
drivers/media/dvb/ttusb-dec/ttusb_dec.c
drivers/media/dvb/ttusb-dec/ttusbdecfe.c
drivers/media/radio/Kconfig
drivers/media/radio/Makefile
drivers/media/radio/dsbr100.c
drivers/media/radio/radio-aimslab.c
drivers/media/radio/radio-aztech.c
drivers/media/radio/radio-cadet.c
drivers/media/radio/radio-gemtek-pci.c
drivers/media/radio/radio-gemtek.c
drivers/media/radio/radio-maestro.c
drivers/media/radio/radio-maxiradio.c
drivers/media/radio/radio-mr800.c [new file with mode: 0644]
drivers/media/radio/radio-rtrack2.c
drivers/media/radio/radio-sf16fmi.c
drivers/media/radio/radio-sf16fmr2.c
drivers/media/radio/radio-si470x.c
drivers/media/radio/radio-terratec.c
drivers/media/radio/radio-trust.c
drivers/media/radio/radio-typhoon.c
drivers/media/radio/radio-zoltrix.c
drivers/media/video/Kconfig
drivers/media/video/Makefile
drivers/media/video/arv.c
drivers/media/video/au0828/au0828-cards.c
drivers/media/video/au0828/au0828-dvb.c
drivers/media/video/au0828/au0828.h
drivers/media/video/bt856.c
drivers/media/video/bt8xx/bttv-cards.c
drivers/media/video/bt8xx/bttv-driver.c
drivers/media/video/bt8xx/bttv-input.c
drivers/media/video/bt8xx/bttv.h
drivers/media/video/btcx-risc.c
drivers/media/video/bw-qcam.c
drivers/media/video/bw-qcam.h
drivers/media/video/c-qcam.c
drivers/media/video/cafe_ccic.c
drivers/media/video/cpia.c
drivers/media/video/cpia2/cpia2_core.c
drivers/media/video/cpia2/cpia2_usb.c
drivers/media/video/cpia2/cpia2_v4l.c
drivers/media/video/cx18/Makefile
drivers/media/video/cx18/cx18-audio.c
drivers/media/video/cx18/cx18-av-core.c
drivers/media/video/cx18/cx18-av-core.h
drivers/media/video/cx18/cx18-av-firmware.c
drivers/media/video/cx18/cx18-cards.c
drivers/media/video/cx18/cx18-driver.c
drivers/media/video/cx18/cx18-driver.h
drivers/media/video/cx18/cx18-dvb.c
drivers/media/video/cx18/cx18-fileops.c
drivers/media/video/cx18/cx18-firmware.c
drivers/media/video/cx18/cx18-gpio.c
drivers/media/video/cx18/cx18-gpio.h
drivers/media/video/cx18/cx18-i2c.c
drivers/media/video/cx18/cx18-io.c [new file with mode: 0644]
drivers/media/video/cx18/cx18-io.h [new file with mode: 0644]
drivers/media/video/cx18/cx18-ioctl.c
drivers/media/video/cx18/cx18-irq.c
drivers/media/video/cx18/cx18-mailbox.c
drivers/media/video/cx18/cx18-queue.c
drivers/media/video/cx18/cx18-scb.c
drivers/media/video/cx18/cx18-streams.c
drivers/media/video/cx18/cx18-version.h
drivers/media/video/cx18/cx23418.h
drivers/media/video/cx2341x.c
drivers/media/video/cx23885/Kconfig
drivers/media/video/cx23885/cx23885-417.c
drivers/media/video/cx23885/cx23885-cards.c
drivers/media/video/cx23885/cx23885-core.c
drivers/media/video/cx23885/cx23885-dvb.c
drivers/media/video/cx23885/cx23885-vbi.c
drivers/media/video/cx23885/cx23885-video.c
drivers/media/video/cx23885/cx23885.h
drivers/media/video/cx25840/cx25840-vbi.c
drivers/media/video/cx88/Kconfig
drivers/media/video/cx88/cx88-blackbird.c
drivers/media/video/cx88/cx88-cards.c
drivers/media/video/cx88/cx88-dvb.c
drivers/media/video/cx88/cx88-i2c.c
drivers/media/video/cx88/cx88-input.c
drivers/media/video/cx88/cx88-video.c
drivers/media/video/cx88/cx88.h
drivers/media/video/dabusb.c
drivers/media/video/dpc7146.c [deleted file]
drivers/media/video/em28xx/em28xx-cards.c
drivers/media/video/em28xx/em28xx-dvb.c
drivers/media/video/em28xx/em28xx-i2c.c
drivers/media/video/em28xx/em28xx-video.c
drivers/media/video/em28xx/em28xx.h
drivers/media/video/et61x251/et61x251_core.c
drivers/media/video/gspca/Kconfig
drivers/media/video/gspca/Makefile
drivers/media/video/gspca/conex.c
drivers/media/video/gspca/etoms.c
drivers/media/video/gspca/finepix.c [new file with mode: 0644]
drivers/media/video/gspca/gspca.c
drivers/media/video/gspca/gspca.h
drivers/media/video/gspca/m5602/Kconfig [new file with mode: 0644]
drivers/media/video/gspca/m5602/Makefile [new file with mode: 0644]
drivers/media/video/gspca/m5602/m5602_bridge.h [new file with mode: 0644]
drivers/media/video/gspca/m5602/m5602_core.c [new file with mode: 0644]
drivers/media/video/gspca/m5602/m5602_mt9m111.c [new file with mode: 0644]
drivers/media/video/gspca/m5602/m5602_mt9m111.h [new file with mode: 0644]
drivers/media/video/gspca/m5602/m5602_ov9650.c [new file with mode: 0644]
drivers/media/video/gspca/m5602/m5602_ov9650.h [new file with mode: 0644]
drivers/media/video/gspca/m5602/m5602_po1030.c [new file with mode: 0644]
drivers/media/video/gspca/m5602/m5602_po1030.h [new file with mode: 0644]
drivers/media/video/gspca/m5602/m5602_s5k4aa.c [new file with mode: 0644]
drivers/media/video/gspca/m5602/m5602_s5k4aa.h [new file with mode: 0644]
drivers/media/video/gspca/m5602/m5602_s5k83a.c [new file with mode: 0644]
drivers/media/video/gspca/m5602/m5602_s5k83a.h [new file with mode: 0644]
drivers/media/video/gspca/m5602/m5602_sensor.h [new file with mode: 0644]
drivers/media/video/gspca/mars.c
drivers/media/video/gspca/ov519.c
drivers/media/video/gspca/pac207.c
drivers/media/video/gspca/pac7311.c
drivers/media/video/gspca/sonixb.c
drivers/media/video/gspca/sonixj.c
drivers/media/video/gspca/spca500.c
drivers/media/video/gspca/spca501.c
drivers/media/video/gspca/spca505.c
drivers/media/video/gspca/spca506.c
drivers/media/video/gspca/spca508.c
drivers/media/video/gspca/spca561.c
drivers/media/video/gspca/stk014.c
drivers/media/video/gspca/sunplus.c
drivers/media/video/gspca/t613.c
drivers/media/video/gspca/tv8532.c
drivers/media/video/gspca/vc032x.c
drivers/media/video/gspca/zc3xx.c
drivers/media/video/ir-kbd-i2c.c
drivers/media/video/ivtv/ivtv-cards.h
drivers/media/video/ivtv/ivtv-driver.c
drivers/media/video/ivtv/ivtv-driver.h
drivers/media/video/ivtv/ivtv-fileops.c
drivers/media/video/ivtv/ivtv-fileops.h
drivers/media/video/ivtv/ivtv-gpio.c
drivers/media/video/ivtv/ivtv-gpio.h
drivers/media/video/ivtv/ivtv-i2c.c
drivers/media/video/ivtv/ivtv-ioctl.c
drivers/media/video/ivtv/ivtv-irq.c
drivers/media/video/ivtv/ivtv-streams.c
drivers/media/video/ivtv/ivtv-vbi.c
drivers/media/video/ivtv/ivtv-yuv.c
drivers/media/video/ivtv/ivtvfb.c
drivers/media/video/meye.c
drivers/media/video/meye.h
drivers/media/video/mt9m001.c
drivers/media/video/mt9m111.c [new file with mode: 0644]
drivers/media/video/mt9v022.c
drivers/media/video/mxb.c
drivers/media/video/ov511.c
drivers/media/video/ov511.h
drivers/media/video/ovcamchip/ovcamchip_core.c
drivers/media/video/ovcamchip/ovcamchip_priv.h
drivers/media/video/pms.c
drivers/media/video/pvrusb2/pvrusb2-ctrl.c
drivers/media/video/pvrusb2/pvrusb2-ctrl.h
drivers/media/video/pvrusb2/pvrusb2-hdw-internal.h
drivers/media/video/pvrusb2/pvrusb2-hdw.c
drivers/media/video/pvrusb2/pvrusb2-hdw.h
drivers/media/video/pvrusb2/pvrusb2-i2c-chips-v4l2.c
drivers/media/video/pvrusb2/pvrusb2-i2c-cmd-v4l2.c
drivers/media/video/pvrusb2/pvrusb2-i2c-cmd-v4l2.h
drivers/media/video/pvrusb2/pvrusb2-i2c-core.c
drivers/media/video/pvrusb2/pvrusb2-main.c
drivers/media/video/pvrusb2/pvrusb2-sysfs.c
drivers/media/video/pvrusb2/pvrusb2-v4l2.c
drivers/media/video/pwc/pwc-ctrl.c
drivers/media/video/pwc/pwc-if.c
drivers/media/video/pwc/pwc-v4l.c
drivers/media/video/pxa_camera.c
drivers/media/video/s2255drv.c
drivers/media/video/saa5246a.c
drivers/media/video/saa5246a.h [deleted file]
drivers/media/video/saa5249.c
drivers/media/video/saa7115.c
drivers/media/video/saa7134/saa6752hs.c
drivers/media/video/saa7134/saa7134-cards.c
drivers/media/video/saa7134/saa7134-core.c
drivers/media/video/saa7134/saa7134-dvb.c
drivers/media/video/saa7134/saa7134-empress.c
drivers/media/video/saa7134/saa7134-i2c.c
drivers/media/video/saa7134/saa7134-input.c
drivers/media/video/saa7134/saa7134-ts.c
drivers/media/video/saa7134/saa7134-video.c
drivers/media/video/saa7134/saa7134.h
drivers/media/video/se401.c
drivers/media/video/sh_mobile_ceu_camera.c
drivers/media/video/sn9c102/sn9c102_core.c
drivers/media/video/sn9c102/sn9c102_devtable.h
drivers/media/video/sn9c102/sn9c102_hv7131d.c
drivers/media/video/sn9c102/sn9c102_hv7131r.c
drivers/media/video/sn9c102/sn9c102_mi0343.c
drivers/media/video/sn9c102/sn9c102_mi0360.c
drivers/media/video/sn9c102/sn9c102_mt9v111.c
drivers/media/video/sn9c102/sn9c102_ov7630.c
drivers/media/video/sn9c102/sn9c102_ov7660.c
drivers/media/video/sn9c102/sn9c102_pas106b.c
drivers/media/video/sn9c102/sn9c102_pas202bcb.c
drivers/media/video/sn9c102/sn9c102_tas5110c1b.c
drivers/media/video/sn9c102/sn9c102_tas5110d.c
drivers/media/video/sn9c102/sn9c102_tas5130d1b.c
drivers/media/video/stk-webcam.c
drivers/media/video/stk-webcam.h
drivers/media/video/stradis.c
drivers/media/video/stv680.c
drivers/media/video/tda9840.c
drivers/media/video/tda9840.h
drivers/media/video/tea6415c.c
drivers/media/video/tea6420.c
drivers/media/video/tuner-3036.c [deleted file]
drivers/media/video/tuner-core.c
drivers/media/video/usbvideo/ibmcam.c
drivers/media/video/usbvideo/konicawc.c
drivers/media/video/usbvideo/quickcam_messenger.c
drivers/media/video/usbvideo/ultracam.c
drivers/media/video/usbvideo/usbvideo.c
drivers/media/video/usbvideo/vicam.c
drivers/media/video/usbvision/usbvision-core.c
drivers/media/video/usbvision/usbvision-i2c.c
drivers/media/video/usbvision/usbvision-video.c
drivers/media/video/uvc/uvc_ctrl.c
drivers/media/video/uvc/uvc_driver.c
drivers/media/video/uvc/uvc_status.c
drivers/media/video/uvc/uvc_v4l2.c
drivers/media/video/uvc/uvc_video.c
drivers/media/video/uvc/uvcvideo.h
drivers/media/video/v4l2-common.c
drivers/media/video/v4l2-dev.c
drivers/media/video/v4l2-ioctl.c
drivers/media/video/vino.c
drivers/media/video/vivi.c
drivers/media/video/vpx3220.c
drivers/media/video/w9966.c
drivers/media/video/zc0301/zc0301_core.c
drivers/media/video/zoran/Kconfig [new file with mode: 0644]
drivers/media/video/zoran/Makefile [new file with mode: 0644]
drivers/media/video/zoran/videocodec.c [moved from drivers/media/video/videocodec.c with 100% similarity]
drivers/media/video/zoran/videocodec.h [moved from drivers/media/video/videocodec.h with 100% similarity]
drivers/media/video/zoran/zoran.h [moved from drivers/media/video/zoran.h with 100% similarity]
drivers/media/video/zoran/zoran_card.c [moved from drivers/media/video/zoran_card.c with 100% similarity]
drivers/media/video/zoran/zoran_card.h [moved from drivers/media/video/zoran_card.h with 100% similarity]
drivers/media/video/zoran/zoran_device.c [moved from drivers/media/video/zoran_device.c with 99% similarity]
drivers/media/video/zoran/zoran_device.h [moved from drivers/media/video/zoran_device.h with 94% similarity]
drivers/media/video/zoran/zoran_driver.c [moved from drivers/media/video/zoran_driver.c with 99% similarity]
drivers/media/video/zoran/zoran_procfs.c [moved from drivers/media/video/zoran_procfs.c with 100% similarity]
drivers/media/video/zoran/zoran_procfs.h [moved from drivers/media/video/zoran_procfs.h with 100% similarity]
drivers/media/video/zoran/zr36016.c [moved from drivers/media/video/zr36016.c with 100% similarity]
drivers/media/video/zoran/zr36016.h [moved from drivers/media/video/zr36016.h with 100% similarity]
drivers/media/video/zoran/zr36050.c [moved from drivers/media/video/zr36050.c with 100% similarity]
drivers/media/video/zoran/zr36050.h [moved from drivers/media/video/zr36050.h with 100% similarity]
drivers/media/video/zoran/zr36057.h [moved from drivers/media/video/zr36057.h with 100% similarity]
drivers/media/video/zoran/zr36060.c [moved from drivers/media/video/zr36060.c with 100% similarity]
drivers/media/video/zoran/zr36060.h [moved from drivers/media/video/zr36060.h with 100% similarity]
drivers/media/video/zr364xx.c
drivers/mtd/maps/pcmciamtd.c
drivers/net/3c501.c
drivers/net/3c515.c
drivers/net/Kconfig
drivers/net/appletalk/cops.c
drivers/net/cxgb3/adapter.h
drivers/net/cxgb3/ael1002.c
drivers/net/cxgb3/common.h
drivers/net/cxgb3/cxgb3_ctl_defs.h
drivers/net/cxgb3/cxgb3_defs.h
drivers/net/cxgb3/cxgb3_ioctl.h
drivers/net/cxgb3/cxgb3_main.c
drivers/net/cxgb3/cxgb3_offload.c
drivers/net/cxgb3/cxgb3_offload.h
drivers/net/cxgb3/firmware_exports.h
drivers/net/cxgb3/l2t.c
drivers/net/cxgb3/l2t.h
drivers/net/cxgb3/mc5.c
drivers/net/cxgb3/sge.c
drivers/net/cxgb3/t3_cpl.h
drivers/net/cxgb3/t3_hw.c
drivers/net/cxgb3/t3cdev.h
drivers/net/cxgb3/version.h
drivers/net/cxgb3/vsc8211.c
drivers/net/cxgb3/xgmac.c
drivers/net/eexpress.c
drivers/net/enic/enic_main.c
drivers/net/ibmlana.c
drivers/net/jme.c
drivers/net/macmace.c
drivers/net/pcmcia/3c574_cs.c
drivers/net/pcmcia/3c589_cs.c
drivers/net/pcmcia/axnet_cs.c
drivers/net/pcmcia/com20020_cs.c
drivers/net/pcmcia/fmvj18x_cs.c
drivers/net/pcmcia/ibmtr_cs.c
drivers/net/pcmcia/nmclan_cs.c
drivers/net/pcmcia/pcnet_cs.c
drivers/net/pcmcia/smc91c92_cs.c
drivers/net/pcmcia/xirc2ps_cs.c
drivers/net/phy/mdio_bus.c
drivers/net/phy/phy_device.c
drivers/net/qlge/qlge.h
drivers/net/qlge/qlge_main.c
drivers/net/tlan.c
drivers/net/tokenring/smctr.c
drivers/net/tulip/de2104x.c
drivers/net/tulip/dmfe.c
drivers/net/via-velocity.c
drivers/net/wan/z85230.c
drivers/net/wan/z85230.h
drivers/net/wireless/airo_cs.c
drivers/net/wireless/atmel_cs.c
drivers/net/wireless/b43/pcmcia.c
drivers/net/wireless/hostap/hostap_cs.c
drivers/net/wireless/libertas/if_cs.c
drivers/net/wireless/netwave_cs.c
drivers/net/wireless/orinoco_cs.c
drivers/net/wireless/ray_cs.c
drivers/net/wireless/spectrum_cs.c
drivers/net/wireless/wavelan.c
drivers/net/wireless/wavelan.p.h
drivers/net/wireless/wavelan_cs.c
drivers/net/wireless/wl3501_cs.c
drivers/parport/parport_cs.c
drivers/pcmcia/Makefile
drivers/pcmcia/au1000_generic.c
drivers/pcmcia/au1000_generic.h
drivers/pcmcia/au1000_pb1x00.c
drivers/pcmcia/au1000_xxs1500.c
drivers/pcmcia/cardbus.c
drivers/pcmcia/cistpl.c
drivers/pcmcia/cs.c
drivers/pcmcia/cs_internal.h
drivers/pcmcia/ds.c
drivers/pcmcia/ds_internal.h [deleted file]
drivers/pcmcia/hd64465_ss.c
drivers/pcmcia/i82365.c
drivers/pcmcia/m32r_cfc.c
drivers/pcmcia/m32r_pcc.c
drivers/pcmcia/m8xx_pcmcia.c
drivers/pcmcia/o2micro.h
drivers/pcmcia/pcmcia_ioctl.c
drivers/pcmcia/pcmcia_resource.c
drivers/pcmcia/pxa2xx_base.c
drivers/pcmcia/rsrc_nonstatic.c
drivers/pcmcia/soc_common.c
drivers/pcmcia/soc_common.h
drivers/pcmcia/socket_sysfs.c
drivers/pcmcia/tcic.c
drivers/pcmcia/ti113x.h
drivers/pcmcia/yenta_socket.c
drivers/s390/net/claw.c
drivers/scsi/Kconfig
drivers/scsi/atari_dma_emul.c [deleted file]
drivers/scsi/atari_scsi.c
drivers/scsi/ide-scsi.c
drivers/scsi/pcmcia/aha152x_stub.c
drivers/scsi/pcmcia/fdomain_stub.c
drivers/scsi/pcmcia/nsp_cs.c
drivers/scsi/pcmcia/qlogic_stub.c
drivers/scsi/pcmcia/sym53c500_cs.c
drivers/serial/8250.c
drivers/serial/serial_cs.c
drivers/ssb/pcmcia.c
drivers/telephony/ixj_pcmcia.c
drivers/usb/host/sl811_cs.c
drivers/video/console/fbcon.c
drivers/video/console/mdacon.c
drivers/video/console/sticon.c
drivers/video/console/vgacon.c
include/asm-m68k/atarihw.h
include/asm-m68k/dma-mapping.h
include/asm-m68k/dma.h
include/asm-m68k/entry.h
include/asm-m68k/io.h
include/asm-m68k/pci.h
include/asm-m68k/virtconvert.h
include/linux/console_struct.h
include/linux/dvb/frontend.h
include/linux/dvb/version.h
include/linux/i2c-id.h
include/linux/ide.h
include/linux/if_ether.h
include/linux/if_fddi.h
include/linux/if_hippi.h
include/linux/igmp.h
include/linux/ivtv.h
include/linux/netdevice.h
include/linux/videodev2.h
include/media/ir-common.h
include/media/saa7115.h
include/media/saa7146.h
include/media/sh_mobile_ceu.h
include/media/soc_camera.h
include/media/tuner.h
include/media/v4l2-chip-ident.h
include/media/v4l2-common.h
include/media/v4l2-dev.h
include/media/v4l2-ioctl.h
include/pcmcia/ciscode.h
include/pcmcia/cistpl.h
include/pcmcia/cs.h
include/pcmcia/cs_types.h
include/pcmcia/device_id.h
include/pcmcia/ds.h
include/pcmcia/ss.h
include/sound/tea575x-tuner.h
init/do_mounts_md.c
init/main.c
net/802/psnap.c
net/appletalk/ddp.c
net/core/datagram.c
net/core/dev_mcast.c
net/core/pktgen.c
net/core/skbuff.c
net/core/stream.c
net/dsa/Kconfig
net/ipv4/icmp.c
net/ipv4/igmp.c
net/ipv4/ip_fragment.c
net/ipv4/ip_input.c
net/ipv4/ipip.c
net/ipv4/ipmr.c
net/ipv4/udp.c
net/ipv6/af_inet6.c
net/netlink/af_netlink.c
net/rfkill/rfkill-input.c
net/sunrpc/xprtsock.c
net/unix/af_unix.c
scripts/bootgraph.pl [new file with mode: 0644]
sound/i2c/other/tea575x-tuner.c

diff --git a/Documentation/laptops/disk-shock-protection.txt b/Documentation/laptops/disk-shock-protection.txt
new file mode 100644 (file)
index 0000000..0e6ba26
--- /dev/null
@@ -0,0 +1,149 @@
+Hard disk shock protection
+==========================
+
+Author: Elias Oltmanns <eo@nebensachen.de>
+Last modified: 2008-10-03
+
+
+0. Contents
+-----------
+
+1. Intro
+2. The interface
+3. References
+4. CREDITS
+
+
+1. Intro
+--------
+
+ATA/ATAPI-7 specifies the IDLE IMMEDIATE command with unload feature.
+Issuing this command should cause the drive to switch to idle mode and
+unload disk heads. This feature is being used in modern laptops in
+conjunction with accelerometers and appropriate software to implement
+a shock protection facility. The idea is to stop all I/O operations on
+the internal hard drive and park its heads on the ramp when critical
+situations are anticipated. The desire to have such a feature
+available on GNU/Linux systems has been the original motivation to
+implement a generic disk head parking interface in the Linux kernel.
+Please note, however, that other components have to be set up on your
+system in order to get disk shock protection working (see
+section 3. References below for pointers to more information about
+that).
+
+
+2. The interface
+----------------
+
+For each ATA device, the kernel exports the file
+block/*/device/unload_heads in sysfs (here assumed to be mounted under
+/sys). Access to /sys/block/*/device/unload_heads is denied with
+-EOPNOTSUPP if the device does not support the unload feature.
+Otherwise, writing an integer value to this file will take the heads
+of the respective drive off the platter and block all I/O operations
+for the specified number of milliseconds. When the timeout expires and
+no further disk head park request has been issued in the meantime,
+normal operation will be resumed. The maximal value accepted for a
+timeout is 30000 milliseconds. Exceeding this limit will return
+-EOVERFLOW, but heads will be parked anyway and the timeout will be
+set to 30 seconds. However, you can always change a timeout to any
+value between 0 and 30000 by issuing a subsequent head park request
+before the timeout of the previous one has expired. In particular, the
+total timeout can exceed 30 seconds and, more importantly, you can
+cancel a previously set timeout and resume normal operation
+immediately by specifying a timeout of 0. Values below -2 are rejected
+with -EINVAL (see below for the special meaning of -1 and -2). If the
+timeout specified for a recent head park request has not yet expired,
+reading from /sys/block/*/device/unload_heads will report the number
+of milliseconds remaining until normal operation will be resumed;
+otherwise, reading the unload_heads attribute will return 0.
+
+For example, do the following in order to park the heads of drive
+/dev/sda and stop all I/O operations for five seconds:
+
+# echo 5000 > /sys/block/sda/device/unload_heads
+
+A simple
+
+# cat /sys/block/sda/device/unload_heads
+
+will show you how many milliseconds are left before normal operation
+will be resumed.
+
+A word of caution: The fact that the interface operates on a basis of
+milliseconds may raise expectations that cannot be satisfied in
+reality. In fact, the ATA specs clearly state that the time for an
+unload operation to complete is vendor specific. The hint in ATA-7
+that this will typically be within 500 milliseconds apparently has
+been dropped in ATA-8.
+
+There is a technical detail of this implementation that may cause some
+confusion and should be discussed here. When a head park request has
+been issued to a device successfully, all I/O operations on the
+controller port this device is attached to will be deferred. That is
+to say, any other device that may be connected to the same port will
+be affected too. The only exception is that a subsequent head unload
+request to that other device will be executed immediately. Further
+operations on that port will be deferred until the timeout specified
+for either device on the port has expired. As far as PATA (old style
+IDE) configurations are concerned, there can only be two devices
+attached to any single port. In SATA world we have port multipliers
+which means that a user-issued head parking request to one device may
+actually result in stopping I/O to a whole bunch of devices. However,
+since this feature is supposed to be used on laptops and does not seem
+to be very useful in any other environment, there will be mostly one
+device per port. Even if the CD/DVD writer happens to be connected to
+the same port as the hard drive, it generally *should* recover just
+fine from the occasional buffer under-run incurred by a head park
+request to the HD. Actually, when you are using an ide driver rather
+than its libata counterpart (i.e. your disk is called /dev/hda
+instead of /dev/sda), then parking the heads of one drive (drive X)
+will generally not affect the mode of operation of another drive
+(drive Y) on the same port as described above. It is only when a port
+reset is required to recover from an exception on drive Y that further
+I/O operations on that drive (and the reset itself) will be delayed
+until drive X is no longer in the parked state.
+
+Finally, there are some hard drives that only comply with an earlier
+version of the ATA standard than ATA-7, but do support the unload
+feature nonetheless. Unfortunately, there is no safe way Linux can
+detect these devices, so you won't be able to write to the
+unload_heads attribute. If you know that your device really does
+support the unload feature (for instance, because the vendor of your
+laptop or the hard drive itself told you so), then you can tell the
+kernel to enable the usage of this feature for that drive by writing
+the special value -1 to the unload_heads attribute:
+
+# echo -1 > /sys/block/sda/device/unload_heads
+
+will enable the feature for /dev/sda, and giving -2 instead of -1 will
+disable it again.
+
+
+3. References
+-------------
+
+There are several laptops from different vendors featuring shock
+protection capabilities. As manufacturers have refused to support open
+source development of the required software components so far, Linux
+support for shock protection varies considerably between different
+hardware implementations. Ideally, this section should contain a list
+of pointers at different projects aiming at an implementation of shock
+protection on different systems. Unfortunately, I only know of a
+single project which, although still considered experimental, is fit
+for use. Please feel free to add projects that have been the victims
+of my ignorance.
+
+- http://www.thinkwiki.org/wiki/HDAPS
+  See this page for information about Linux support of the hard disk
+  active protection system as implemented in IBM/Lenovo Thinkpads.
+
+
+4. CREDITS
+----------
+
+This implementation of disk head parking has been inspired by a patch
+originally published by Jon Escombe <lists@dresco.co.uk>. My efforts
+to develop an implementation of this feature that is fit to be merged
+into mainline have been aided by various kernel developers, in
+particular by Tejun Heo and Bartlomiej Zolnierkiewicz.
index 96f155e..0599343 100644 (file)
@@ -1,5 +1,11 @@
 This file details changes in 2.6 which affect PCMCIA card driver authors:
 
+* New configuration loop helper (as of 2.6.28)
+   By calling pcmcia_loop_config(), a driver can iterate over all available
+   configuration options. During a driver's probe() phase, one doesn't need
+   to use pcmcia_get_{first,next}_tuple, pcmcia_get_tuple_data and
+   pcmcia_parse_tuple directly in most if not all cases.
+
 * New release helper (as of 2.6.17)
    Instead of calling pcmcia_release_{configuration,io,irq,win}, all that's
    necessary now is calling pcmcia_disable_device. As there is no valid
index f32efb6..60ba668 100644 (file)
 149 -> Typhoon TV-Tuner PCI (50684)
 150 -> Geovision GV-600                                    [008a:763c]
 151 -> Kozumi KTV-01C
+152 -> Encore ENL TV-FM-2                                  [1000:1801]
index f0e613b..64823cc 100644 (file)
@@ -9,3 +9,5 @@
   8 -> Hauppauge WinTV-HVR1700                             [0070:8101]
   9 -> Hauppauge WinTV-HVR1400                             [0070:8010]
  10 -> DViCO FusionHDTV7 Dual Express                      [18ac:d618]
+ 11 -> DViCO FusionHDTV DVB-T Dual Express                 [18ac:db78]
+ 12 -> Leadtek Winfast PxDVR3200 H                         [107d:6681]
index 7cf5685..a5227e3 100644 (file)
  65 -> DViCO FusionHDTV 7 Gold                             [18ac:d610]
  66 -> Prolink Pixelview MPEG 8000GT                       [1554:4935]
  67 -> Kworld PlusTV HD PCI 120 (ATSC 120)                 [17de:08c1]
+ 68 -> Hauppauge WinTV-HVR4000 DVB-S/S2/T/Hybrid           [0070:6900,0070:6904,0070:6902]
+ 69 -> Hauppauge WinTV-HVR4000(Lite) DVB-S/S2              [0070:6905,0070:6906]
+ 70 -> TeVii S460 DVB-S/S2                                 [d460:9022]
+ 71 -> Omicom SS4 DVB-S/S2 PCI                             [A044:2011]
+ 72 -> TBS 8920 DVB-S/S2                                   [8920:8888]
+ 73 -> TeVii S420 DVB-S                                    [d420:9022]
+ 74 -> Prolink Pixelview Global Extreme                    [1554:4976]
+ 75 -> PROF 7300 DVB-S/S2                                  [B033:3033]
index 53449cb..187cc48 100644 (file)
@@ -1,5 +1,5 @@
   0 -> Unknown EM2800 video grabber             (em2800)        [eb1a:2800]
-  1 -> Unknown EM2750/28xx video grabber        (em2820/em2840) [eb1a:2820,eb1a:2821,eb1a:2860,eb1a:2861,eb1a:2870,eb1a:2881,eb1a:2883]
+  1 -> Unknown EM2750/28xx video grabber        (em2820/em2840) [eb1a:2820,eb1a:2860,eb1a:2861,eb1a:2870,eb1a:2881,eb1a:2883]
   2 -> Terratec Cinergy 250 USB                 (em2820/em2840) [0ccd:0036]
   3 -> Pinnacle PCTV USB 2                      (em2820/em2840) [2304:0208]
   4 -> Hauppauge WinTV USB 2                    (em2820/em2840) [2040:4200,2040:4201]
@@ -12,7 +12,7 @@
  11 -> Terratec Hybrid XS                       (em2880)        [0ccd:0042]
  12 -> Kworld PVR TV 2800 RF                    (em2820/em2840)
  13 -> Terratec Prodigy XS                      (em2880)        [0ccd:0047]
- 14 -> Pixelview Prolink PlayTV USB 2.0         (em2820/em2840)
+ 14 -> Pixelview Prolink PlayTV USB 2.0         (em2820/em2840) [eb1a:2821]
  15 -> V-Gear PocketTV                          (em2800)
  16 -> Hauppauge WinTV HVR 950                  (em2883)        [2040:6513,2040:6517,2040:651b,2040:651f]
  17 -> Pinnacle PCTV HD Pro Stick               (em2880)        [2304:0227]
index 39868af..dc67eef 100644 (file)
@@ -76,7 +76,7 @@
  75 -> AVerMedia AVerTVHD MCE A180              [1461:1044]
  76 -> SKNet MonsterTV Mobile                   [1131:4ee9]
  77 -> Pinnacle PCTV 40i/50i/110i (saa7133)     [11bd:002e]
- 78 -> ASUSTeK P7131 Dual                       [1043:4862,1043:4857]
+ 78 -> ASUSTeK P7131 Dual                       [1043:4862]
  79 -> Sedna/MuchTV PC TV Cardbus TV/Radio (ITO25 Rev:2B)
  80 -> ASUS Digimatrix TV                       [1043:0210]
  81 -> Philips Tiger reference design           [1131:2018]
 144 -> Beholder BeholdTV M6 Extra               [5ace:6193]
 145 -> AVerMedia MiniPCI DVB-T Hybrid M103      [1461:f636]
 146 -> ASUSTeK P7131 Analog
+147 -> Asus Tiger 3in1                          [1043:4878]
+148 -> Encore ENLTV-FM v5.3                     [1a7f:2008]
+149 -> Avermedia PCI pure analog (M135A)        [1461:f11d]
+150 -> Zogis Real Angel 220
+151 -> ADS Tech Instant HDTV                    [1421:0380]
+152 -> Asus Tiger Rev:1.00                      [1043:4857]
index 0e23946..30bbdda 100644 (file)
@@ -74,3 +74,4 @@ tuner=72 - Thomson FE6600
 tuner=73 - Samsung TCPG 6121P30A
 tuner=75 - Philips TEA5761 FM Radio
 tuner=76 - Xceive 5000 tuner
+tuner=77 - TCL tuner MF02GIP-5N-E
index 9a3e4d7..004818f 100644 (file)
@@ -7,6 +7,7 @@ The modules are:
 xxxx           vend:prod
 ----
 spca501                0000:0000       MystFromOri Unknow Camera
+m5602          0402:5602       ALi Video Camera Controller
 spca501                040a:0002       Kodak DVC-325
 spca500                040a:0300       Kodak EZ200
 zc3xx          041e:041e       Creative WebCam Live!
@@ -42,6 +43,7 @@ zc3xx         0458:7007       Genius VideoCam V2
 zc3xx          0458:700c       Genius VideoCam V3
 zc3xx          0458:700f       Genius VideoCam Web V2
 sonixj         0458:7025       Genius Eye 311Q
+sonixj         0458:702e       Genius Slim 310 NB
 sonixj         045e:00f5       MicroSoft VX3000
 sonixj         045e:00f7       MicroSoft VX1000
 ov519          045e:028c       Micro$oft xbox cam
@@ -81,7 +83,7 @@ spca561               046d:092b       Labtec Webcam Plus
 spca561                046d:092c       Logitech QC chat Elch2
 spca561                046d:092d       Logitech QC Elch2
 spca561                046d:092e       Logitech QC Elch2
-spca561                046d:092f       Logitech QC Elch2
+spca561                046d:092f       Logitech  QuickCam Express Plus
 sunplus                046d:0960       Logitech ClickSmart 420
 sunplus                0471:0322       Philips DMVC1300K
 zc3xx          0471:0325       Philips SPC 200 NC
@@ -96,6 +98,29 @@ sunplus              04a5:3003       Benq DC 1300
 sunplus                04a5:3008       Benq DC 1500
 sunplus                04a5:300a       Benq DC 3410
 spca500                04a5:300c       Benq DC 1016
+finepix                04cb:0104       Fujifilm FinePix 4800
+finepix                04cb:0109       Fujifilm FinePix A202
+finepix                04cb:010b       Fujifilm FinePix A203
+finepix                04cb:010f       Fujifilm FinePix A204
+finepix                04cb:0111       Fujifilm FinePix A205
+finepix                04cb:0113       Fujifilm FinePix A210
+finepix                04cb:0115       Fujifilm FinePix A303
+finepix                04cb:0117       Fujifilm FinePix A310
+finepix                04cb:0119       Fujifilm FinePix F401
+finepix                04cb:011b       Fujifilm FinePix F402
+finepix                04cb:011d       Fujifilm FinePix F410
+finepix                04cb:0121       Fujifilm FinePix F601
+finepix                04cb:0123       Fujifilm FinePix F700
+finepix                04cb:0125       Fujifilm FinePix M603
+finepix                04cb:0127       Fujifilm FinePix S300
+finepix                04cb:0129       Fujifilm FinePix S304
+finepix                04cb:012b       Fujifilm FinePix S500
+finepix                04cb:012d       Fujifilm FinePix S602
+finepix                04cb:012f       Fujifilm FinePix S700
+finepix                04cb:0131       Fujifilm FinePix unknown model
+finepix                04cb:013b       Fujifilm FinePix unknown model
+finepix                04cb:013d       Fujifilm FinePix unknown model
+finepix                04cb:013f       Fujifilm FinePix F420
 sunplus                04f1:1001       JVC GC A50
 spca561                04fc:0561       Flexcam 100
 sunplus                04fc:500c       Sunplus CA500C
@@ -181,6 +206,7 @@ pac207              093a:2468       PAC207
 pac207         093a:2470       Genius GF112
 pac207         093a:2471       Genius VideoCam ge111
 pac207         093a:2472       Genius VideoCam ge110
+pac207         093a:2476       Genius e-Messenger 112
 pac7311                093a:2600       PAC7311 Typhoon
 pac7311                093a:2601       Philips SPC 610 NC
 pac7311                093a:2603       PAC7312
diff --git a/Documentation/video4linux/m5602.txt b/Documentation/video4linux/m5602.txt
new file mode 100644 (file)
index 0000000..4450ab1
--- /dev/null
@@ -0,0 +1,12 @@
+This document describes the ALi m5602 bridge connected
+to the following supported sensors:
+OmniVision OV9650,
+Samsung s5k83a,
+Samsung s5k4aa,
+Micron mt9m111,
+Pixel plus PO1030
+
+This driver mimics the windows drivers, which have a braindead implementation sending bayer-encoded frames at VGA resolution.
+In a perfect world we should be able to reprogram the m5602 and the connected sensor in hardware instead, supporting a range of resolutions and pixelformats
+
+Anyway, have fun and please report any bugs to m560x-driver-devel@lists.sourceforge.net
diff --git a/Documentation/video4linux/soc-camera.txt b/Documentation/video4linux/soc-camera.txt
new file mode 100644 (file)
index 0000000..178ef3c
--- /dev/null
@@ -0,0 +1,120 @@
+                       Soc-Camera Subsystem
+                       ====================
+
+Terminology
+-----------
+
+The following terms are used in this document:
+ - camera / camera device / camera sensor - a video-camera sensor chip, capable
+   of connecting to a variety of systems and interfaces, typically uses i2c for
+   control and configuration, and a parallel or a serial bus for data.
+ - camera host - an interface, to which a camera is connected. Typically a
+   specialised interface, present on many SoCs, e.g., PXA27x and PXA3xx, SuperH,
+   AVR32, i.MX27, i.MX31.
+ - camera host bus - a connection between a camera host and a camera. Can be
+   parallel or serial, consists of data and control lines, e.g., clock, vertical
+   and horizontal synchronization signals.
+
+Purpose of the soc-camera subsystem
+-----------------------------------
+
+The soc-camera subsystem provides a unified API between camera host drivers and
+camera sensor drivers. It implements a V4L2 interface to the user, currently
+only the mmap method is supported.
+
+This subsystem has been written to connect drivers for System-on-Chip (SoC)
+video capture interfaces with drivers for CMOS camera sensor chips to enable
+the reuse of sensor drivers with various hosts. The subsystem has been designed
+to support multiple camera host interfaces and multiple cameras per interface,
+although most applications have only one camera sensor.
+
+Existing drivers
+----------------
+
+As of 2.6.27-rc4 there are two host drivers in the mainline: pxa_camera.c for
+PXA27x SoCs and sh_mobile_ceu_camera.c for SuperH SoCs, and four sensor drivers:
+mt9m001.c, mt9m111.c, mt9v022.c and a generic soc_camera_platform.c driver. This
+list is not supposed to be updated, look for more examples in your tree.
+
+Camera host API
+---------------
+
+A host camera driver is registered using the
+
+soc_camera_host_register(struct soc_camera_host *);
+
+function. The host object can be initialized as follows:
+
+static struct soc_camera_host pxa_soc_camera_host = {
+       .drv_name       = PXA_CAM_DRV_NAME,
+       .ops            = &pxa_soc_camera_host_ops,
+};
+
+All camera host methods are passed in a struct soc_camera_host_ops:
+
+static struct soc_camera_host_ops pxa_soc_camera_host_ops = {
+       .owner          = THIS_MODULE,
+       .add            = pxa_camera_add_device,
+       .remove         = pxa_camera_remove_device,
+       .suspend        = pxa_camera_suspend,
+       .resume         = pxa_camera_resume,
+       .set_fmt_cap    = pxa_camera_set_fmt_cap,
+       .try_fmt_cap    = pxa_camera_try_fmt_cap,
+       .init_videobuf  = pxa_camera_init_videobuf,
+       .reqbufs        = pxa_camera_reqbufs,
+       .poll           = pxa_camera_poll,
+       .querycap       = pxa_camera_querycap,
+       .try_bus_param  = pxa_camera_try_bus_param,
+       .set_bus_param  = pxa_camera_set_bus_param,
+};
+
+.add and .remove methods are called when a sensor is attached to or detached
+from the host, apart from performing host-internal tasks they shall also call
+sensor driver's .init and .release methods respectively. .suspend and .resume
+methods implement host's power-management functionality and its their
+responsibility to call respective sensor's methods. .try_bus_param and
+.set_bus_param are used to negotiate physical connection parameters between the
+host and the sensor. .init_videobuf is called by soc-camera core when a
+video-device is opened, further video-buffer management is implemented completely
+by the specific camera host driver. The rest of the methods are called from
+respective V4L2 operations.
+
+Camera API
+----------
+
+Sensor drivers can use struct soc_camera_link, typically provided by the
+platform, and used to specify to which camera host bus the sensor is connected,
+and arbitrarily provide platform .power and .reset methods for the camera.
+soc_camera_device_register() and soc_camera_device_unregister() functions are
+used to add a sensor driver to or remove one from the system. The registration
+function takes a pointer to struct soc_camera_device as the only parameter.
+This struct can be initialized as follows:
+
+       /* link to driver operations */
+       icd->ops        = &mt9m001_ops;
+       /* link to the underlying physical (e.g., i2c) device */
+       icd->control    = &client->dev;
+       /* window geometry */
+       icd->x_min      = 20;
+       icd->y_min      = 12;
+       icd->x_current  = 20;
+       icd->y_current  = 12;
+       icd->width_min  = 48;
+       icd->width_max  = 1280;
+       icd->height_min = 32;
+       icd->height_max = 1024;
+       icd->y_skip_top = 1;
+       /* camera bus ID, typically obtained from platform data */
+       icd->iface      = icl->bus_id;
+
+struct soc_camera_ops provides .probe and .remove methods, which are called by
+the soc-camera core, when a camera is matched against or removed from a camera
+host bus, .init, .release, .suspend, and .resume are called from the camera host
+driver as discussed above. Other members of this struct provide respective V4L2
+functionality.
+
+struct soc_camera_device also links to an array of struct soc_camera_data_format,
+listing pixel formats, supported by the camera.
+
+--
+Author: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
index 3fa9ac6..5d0b8a2 100644 (file)
@@ -72,8 +72,8 @@ M: Mail patches to
 L: Mailing list that is relevant to this area
 W: Web-page with status/info
 T: SCM tree type and location.  Type is one of: git, hg, quilt.
-S: Status, one of the following:
 F: Applicable files and/or directories
+S: Status, one of the following:
 
        Supported:      Someone is actually paid to look after this.
        Maintained:     Someone actually looks after it.
index 39516ce..31abe6d 100644 (file)
@@ -36,8 +36,6 @@
 
 struct pxacamera_platform_data {
        int (*init)(struct device *);
-       int (*power)(struct device *, int);
-       int (*reset)(struct device *, int);
 
        unsigned long flags;
        unsigned long mclk_10khz;
index 41e5bf0..677c93a 100644 (file)
@@ -105,21 +105,9 @@ config PCMCIA
          To compile this driver as modules, choose M here: the
          modules will be called pcmcia_core and ds.
 
-config SUN3
-       bool "Sun3 support"
-       select M68020
-       select MMU_SUN3 if MMU
-       help
-         This option enables support for the Sun 3 series of workstations
-         (3/50, 3/60, 3/1xx, 3/2xx systems). Enabling this option requires
-         that all other hardware types must be disabled, as Sun 3 kernels
-         are incompatible with all other m68k targets (including Sun 3x!).
-
-         If you don't want to compile a kernel exclusively for a Sun 3, say N.
-
 config AMIGA
        bool "Amiga support"
-       depends on !MMU_SUN3
+       select MMU_MOTOROLA if MMU
        help
          This option enables support for the Amiga series of computers. If
          you plan to use this kernel on an Amiga, say Y here and browse the
@@ -127,33 +115,16 @@ config AMIGA
 
 config ATARI
        bool "Atari support"
-       depends on !MMU_SUN3
+       select MMU_MOTOROLA if MMU
        help
          This option enables support for the 68000-based Atari series of
          computers (including the TT, Falcon and Medusa). If you plan to use
          this kernel on an Atari, say Y here and browse the material
          available in <file:Documentation/m68k>; otherwise say N.
 
-config HADES
-       bool "Hades support"
-       depends on ATARI && BROKEN
-       help
-         This option enables support for the Hades Atari clone. If you plan
-         to use this kernel on a Hades, say Y here; otherwise say N.
-
-config PCI
-       bool
-       depends on HADES
-       default y
-       help
-         Find out whether you have a PCI motherboard. PCI is the name of a
-         bus system, i.e. the way the CPU talks to the other stuff inside
-         your box. Other bus systems are ISA, EISA, MicroChannel (MCA) or
-         VESA. If you have PCI, say Y, otherwise N.
-
 config MAC
        bool "Macintosh support"
-       depends on !MMU_SUN3
+       select MMU_MOTOROLA if MMU
        help
          This option enables support for the Apple Macintosh series of
          computers (yes, there is experimental support now, at least for part
@@ -174,14 +145,14 @@ config M68K_L2_CACHE
 
 config APOLLO
        bool "Apollo support"
-       depends on !MMU_SUN3
+       select MMU_MOTOROLA if MMU
        help
          Say Y here if you want to run Linux on an MC680x0-based Apollo
          Domain workstation such as the DN3500.
 
 config VME
        bool "VME (Motorola and BVM) support"
-       depends on !MMU_SUN3
+       select MMU_MOTOROLA if MMU
        help
          Say Y here if you want to build a kernel for a 680x0 based VME
          board.  Boards currently supported include Motorola boards MVME147,
@@ -218,7 +189,7 @@ config BVME6000
 
 config HP300
        bool "HP9000/300 and HP9000/400 support"
-       depends on !MMU_SUN3
+       select MMU_MOTOROLA if MMU
        help
          This option enables support for the HP9000/300 and HP9000/400 series
          of workstations. Support for these machines is still somewhat
@@ -237,7 +208,7 @@ config DIO
 
 config SUN3X
        bool "Sun3x support"
-       depends on !MMU_SUN3
+       select MMU_MOTOROLA if MMU
        select M68030
        help
          This option enables support for the Sun 3x series of workstations.
@@ -250,7 +221,7 @@ config SUN3X
 
 config Q40
        bool "Q40/Q60 support"
-       depends on !MMU_SUN3
+       select MMU_MOTOROLA if MMU
        help
          The Q40 is a Motorola 68040-based successor to the Sinclair QL
          manufactured in Germany.  There is an official Q40 home page at
@@ -258,6 +229,19 @@ config Q40
          Q60. Select your CPU below.  For 68LC060 don't forget to enable FPU
          emulation.
 
+config SUN3
+       bool "Sun3 support"
+       depends on !MMU_MOTOROLA
+       select MMU_SUN3 if MMU
+       select M68020
+       help
+         This option enables support for the Sun 3 series of workstations
+         (3/50, 3/60, 3/1xx, 3/2xx systems). Enabling this option requires
+         that all other hardware types must be disabled, as Sun 3 kernels
+         are incompatible with all other m68k targets (including Sun 3x!).
+
+         If you don't want to compile a kernel exclusively for a Sun 3, say N.
+
 comment "Processor type"
 
 config M68020
@@ -295,10 +279,10 @@ config M68060
 config MMU_MOTOROLA
        bool
        depends on MMU && !MMU_SUN3
-       default y
 
 config MMU_SUN3
        bool
+       depends on MMU && !MMU_MOTOROLA
 
 config M68KFPU_EMU
        bool "Math emulation support (EXPERIMENTAL)"
index df679d9..0a3f9e8 100644 (file)
@@ -24,6 +24,7 @@
 #include <linux/interrupt.h>
 #include <linux/zorro.h>
 #include <linux/module.h>
+#include <linux/keyboard.h>
 
 #include <asm/bootinfo.h>
 #include <asm/setup.h>
@@ -984,3 +985,11 @@ static int amiga_get_hardware_list(char *buffer)
 
        return len;
 }
+
+/*
+ * The Amiga keyboard driver needs key_maps, but we cannot export it in
+ * drivers/char/defkeymap.c, as it is autogenerated
+ */
+#ifdef CONFIG_HW_CONSOLE
+EXPORT_SYMBOL_GPL(key_maps);
+#endif
index 2cd905e..0cac723 100644 (file)
@@ -5,7 +5,4 @@
 obj-y          := config.o time.o debug.o ataints.o stdma.o \
                        atasound.o stram.o
 
-ifeq ($(CONFIG_PCI),y)
-obj-$(CONFIG_HADES)    += hades-pci.o
-endif
 obj-$(CONFIG_ATARI_KBD_CORE)   += atakeyb.o
index b45593a..dba4afa 100644 (file)
@@ -407,10 +407,8 @@ void __init atari_init_IRQ(void)
                 * gets overruns)
                 */
 
-               if (!MACH_IS_HADES) {
-                       vectors[VEC_INT2] = falcon_hblhandler;
-                       vectors[VEC_INT4] = falcon_hblhandler;
-               }
+               vectors[VEC_INT2] = falcon_hblhandler;
+               vectors[VEC_INT4] = falcon_hblhandler;
        }
 
        if (ATARIHW_PRESENT(PCM_8BIT) && ATARIHW_PRESENT(MICROWIRE)) {
index bb959fb..c038b7c 100644 (file)
@@ -635,15 +635,3 @@ int atari_keyb_init(void)
        return 0;
 }
 EXPORT_SYMBOL_GPL(atari_keyb_init);
-
-int atari_kbd_translate(unsigned char keycode, unsigned char *keycodep, char raw_mode)
-{
-#ifdef CONFIG_MAGIC_SYSRQ
-       /* ALT+HELP pressed? */
-       if ((keycode == 98) && ((shift_state & 0xff) == 8))
-               *keycodep = 0xff;
-       else
-#endif
-               *keycodep = keycode;
-       return 1;
-}
index 5945e15..af03185 100644 (file)
@@ -231,7 +231,7 @@ void __init config_atari(void)
         */
 
        printk("Atari hardware found: ");
-       if (MACH_IS_MEDUSA || MACH_IS_HADES) {
+       if (MACH_IS_MEDUSA) {
                /* There's no Atari video hardware on the Medusa, but all the
                 * addresses below generate a DTACK so no bus error occurs! */
        } else if (hwreg_present(f030_xreg)) {
@@ -269,10 +269,6 @@ void __init config_atari(void)
                ATARIHW_SET(SCSI_DMA);
                printk("TT_SCSI_DMA ");
        }
-       if (!MACH_IS_HADES && hwreg_present(&st_dma.dma_hi)) {
-               ATARIHW_SET(STND_DMA);
-               printk("STND_DMA ");
-       }
        /*
         * The ST-DMA address registers aren't readable
         * on all Medusas, so the test below may fail
@@ -294,12 +290,11 @@ void __init config_atari(void)
                ATARIHW_SET(YM_2149);
                printk("YM2149 ");
        }
-       if (!MACH_IS_MEDUSA && !MACH_IS_HADES &&
-               hwreg_present(&tt_dmasnd.ctrl)) {
+       if (!MACH_IS_MEDUSA && hwreg_present(&tt_dmasnd.ctrl)) {
                ATARIHW_SET(PCM_8BIT);
                printk("PCM ");
        }
-       if (!MACH_IS_HADES && hwreg_present(&falcon_codec.unused5)) {
+       if (hwreg_present(&falcon_codec.unused5)) {
                ATARIHW_SET(CODEC);
                printk("CODEC ");
        }
@@ -313,7 +308,7 @@ void __init config_atari(void)
            (tt_scc_dma.dma_ctrl = 0x01, (tt_scc_dma.dma_ctrl & 1) == 1) &&
            (tt_scc_dma.dma_ctrl = 0x00, (tt_scc_dma.dma_ctrl & 1) == 0)
 #else
-           !MACH_IS_MEDUSA && !MACH_IS_HADES
+           !MACH_IS_MEDUSA
 #endif
            ) {
                ATARIHW_SET(SCC_DMA);
@@ -327,10 +322,7 @@ void __init config_atari(void)
                ATARIHW_SET(ST_ESCC);
                printk("ST_ESCC ");
        }
-       if (MACH_IS_HADES) {
-               ATARIHW_SET(VME);
-               printk("VME ");
-       } else if (hwreg_present(&tt_scu.sys_mask)) {
+       if (hwreg_present(&tt_scu.sys_mask)) {
                ATARIHW_SET(SCU);
                /* Assume a VME bus if there's a SCU */
                ATARIHW_SET(VME);
@@ -340,7 +332,7 @@ void __init config_atari(void)
                ATARIHW_SET(ANALOG_JOY);
                printk("ANALOG_JOY ");
        }
-       if (!MACH_IS_HADES && hwreg_present(blitter.halftone)) {
+       if (hwreg_present(blitter.halftone)) {
                ATARIHW_SET(BLITTER);
                printk("BLITTER ");
        }
@@ -349,8 +341,7 @@ void __init config_atari(void)
                printk("IDE ");
        }
 #if 1 /* This maybe wrong */
-       if (!MACH_IS_MEDUSA && !MACH_IS_HADES &&
-           hwreg_present(&tt_microwire.data) &&
+       if (!MACH_IS_MEDUSA && hwreg_present(&tt_microwire.data) &&
            hwreg_present(&tt_microwire.mask) &&
            (tt_microwire.mask = 0x7ff,
             udelay(1),
@@ -369,19 +360,18 @@ void __init config_atari(void)
                mach_hwclk = atari_tt_hwclk;
                mach_set_clock_mmss = atari_tt_set_clock_mmss;
        }
-       if (!MACH_IS_HADES && hwreg_present(&mste_rtc.sec_ones)) {
+       if (hwreg_present(&mste_rtc.sec_ones)) {
                ATARIHW_SET(MSTE_CLK);
                printk("MSTE_CLK ");
                mach_hwclk = atari_mste_hwclk;
                mach_set_clock_mmss = atari_mste_set_clock_mmss;
        }
-       if (!MACH_IS_MEDUSA && !MACH_IS_HADES &&
-           hwreg_present(&dma_wd.fdc_speed) &&
+       if (!MACH_IS_MEDUSA && hwreg_present(&dma_wd.fdc_speed) &&
            hwreg_write(&dma_wd.fdc_speed, 0)) {
                ATARIHW_SET(FDCSPEED);
                printk("FDC_SPEED ");
        }
-       if (!MACH_IS_HADES && !ATARIHW_PRESENT(ST_SCSI)) {
+       if (!ATARIHW_PRESENT(ST_SCSI)) {
                ATARIHW_SET(ACSI);
                printk("ACSI ");
        }
@@ -449,7 +439,7 @@ void __init config_atari(void)
         * 0xFFxxxxxx -> 0x00xxxxxx, so that the first 16MB is accessible
         * in the last 16MB of the address space.
         */
-       tos_version = (MACH_IS_MEDUSA || MACH_IS_HADES) ?
+       tos_version = (MACH_IS_MEDUSA) ?
                        0xfff : *(unsigned short *)0xff000002;
        atari_rtc_year_offset = (tos_version < 0x306) ? 70 : 68;
 }
@@ -511,8 +501,7 @@ static void atari_reset(void)
         * On the Medusa, phys. 0x4 may contain garbage because it's no
         * ROM.  See above for explanation why we cannot use PTOV(4).
         */
-       reset_addr = MACH_IS_HADES ? 0x7fe00030 :
-                    MACH_IS_MEDUSA || MACH_IS_AB40 ? 0xe00030 :
+       reset_addr = MACH_IS_MEDUSA || MACH_IS_AB40 ? 0xe00030 :
                     *(unsigned long *) 0xff000004;
 
        /* reset ACIA for switch off OverScan, if it's active */
@@ -606,8 +595,6 @@ static void atari_get_model(char *model)
                if (MACH_IS_MEDUSA)
                        /* Medusa has TT _MCH cookie */
                        strcat(model, "Medusa");
-               else if (MACH_IS_HADES)
-                       strcat(model, "Hades");
                else
                        strcat(model, "TT");
                break;
diff --git a/arch/m68k/atari/hades-pci.c b/arch/m68k/atari/hades-pci.c
deleted file mode 100644 (file)
index 2bbabc0..0000000
+++ /dev/null
@@ -1,440 +0,0 @@
-/*
- * hades-pci.c - Hardware specific PCI BIOS functions the Hades Atari clone.
- *
- * Written by Wout Klaren.
- */
-
-#include <linux/init.h>
-#include <linux/kernel.h>
-#include <asm/io.h>
-
-#if 0
-# define DBG_DEVS(args)                printk args
-#else
-# define DBG_DEVS(args)
-#endif
-
-#if defined(CONFIG_PCI) && defined(CONFIG_HADES)
-
-#include <linux/slab.h>
-#include <linux/mm.h>
-#include <linux/pci.h>
-
-#include <asm/atarihw.h>
-#include <asm/atariints.h>
-#include <asm/byteorder.h>
-#include <asm/pci.h>
-
-#define HADES_MEM_BASE         0x80000000
-#define HADES_MEM_SIZE         0x20000000
-#define HADES_CONFIG_BASE      0xA0000000
-#define HADES_CONFIG_SIZE      0x10000000
-#define HADES_IO_BASE          0xB0000000
-#define HADES_IO_SIZE          0x10000000
-#define HADES_VIRT_IO_SIZE     0x00010000      /* Only 64k is remapped and actually used. */
-
-#define N_SLOTS                                4                       /* Number of PCI slots. */
-
-static const char pci_mem_name[] = "PCI memory space";
-static const char pci_io_name[] = "PCI I/O space";
-static const char pci_config_name[] = "PCI config space";
-
-static struct resource config_space = {
-    .name = pci_config_name,
-    .start = HADES_CONFIG_BASE,
-    .end = HADES_CONFIG_BASE + HADES_CONFIG_SIZE - 1
-};
-static struct resource io_space = {
-    .name = pci_io_name,
-    .start = HADES_IO_BASE,
-    .end = HADES_IO_BASE + HADES_IO_SIZE - 1
-};
-
-static const unsigned long pci_conf_base_phys[] = {
-    0xA0080000, 0xA0040000, 0xA0020000, 0xA0010000
-};
-static unsigned long pci_conf_base_virt[N_SLOTS];
-static unsigned long pci_io_base_virt;
-
-/*
- * static void *mk_conf_addr(unsigned char bus, unsigned char device_fn,
- *                          unsigned char where)
- *
- * Calculate the address of the PCI configuration area of the given
- * device.
- *
- * BUG: boards with multiple functions are probably not correctly
- * supported.
- */
-
-static void *mk_conf_addr(struct pci_dev *dev, int where)
-{
-       int device = dev->devfn >> 3, function = dev->devfn & 7;
-       void *result;
-
-       DBG_DEVS(("mk_conf_addr(bus=%d ,device_fn=0x%x, where=0x%x, pci_addr=0x%p)\n",
-                 dev->bus->number, dev->devfn, where, pci_addr));
-
-       if (device > 3)
-       {
-               DBG_DEVS(("mk_conf_addr: device (%d) > 3, returning NULL\n", device));
-               return NULL;
-       }
-
-       if (dev->bus->number != 0)
-       {
-               DBG_DEVS(("mk_conf_addr: bus (%d) > 0, returning NULL\n", device));
-               return NULL;
-       }
-
-       result = (void *) (pci_conf_base_virt[device] | (function << 8) | (where));
-       DBG_DEVS(("mk_conf_addr: returning pci_addr 0x%lx\n", (unsigned long) result));
-       return result;
-}
-
-static int hades_read_config_byte(struct pci_dev *dev, int where, u8 *value)
-{
-       volatile unsigned char *pci_addr;
-
-       *value = 0xff;
-
-       if ((pci_addr = (unsigned char *) mk_conf_addr(dev, where)) == NULL)
-               return PCIBIOS_DEVICE_NOT_FOUND;
-
-       *value = *pci_addr;
-
-       return PCIBIOS_SUCCESSFUL;
-}
-
-static int hades_read_config_word(struct pci_dev *dev, int where, u16 *value)
-{
-       volatile unsigned short *pci_addr;
-
-       *value = 0xffff;
-
-       if (where & 0x1)
-               return PCIBIOS_BAD_REGISTER_NUMBER;
-
-       if ((pci_addr = (unsigned short *) mk_conf_addr(dev, where)) == NULL)
-               return PCIBIOS_DEVICE_NOT_FOUND;
-
-       *value = le16_to_cpu(*pci_addr);
-
-       return PCIBIOS_SUCCESSFUL;
-}
-
-static int hades_read_config_dword(struct pci_dev *dev, int where, u32 *value)
-{
-       volatile unsigned int *pci_addr;
-       unsigned char header_type;
-       int result;
-
-       *value = 0xffffffff;
-
-       if (where & 0x3)
-               return PCIBIOS_BAD_REGISTER_NUMBER;
-
-       if ((pci_addr = (unsigned int *) mk_conf_addr(dev, where)) == NULL)
-               return PCIBIOS_DEVICE_NOT_FOUND;
-
-       *value = le32_to_cpu(*pci_addr);
-
-       /*
-        * Check if the value is an address on the bus. If true, add the
-        * base address of the PCI memory or PCI I/O area on the Hades.
-        */
-
-       if ((result = hades_read_config_byte(dev, PCI_HEADER_TYPE,
-                                            &header_type)) != PCIBIOS_SUCCESSFUL)
-               return result;
-
-       if (((where >= PCI_BASE_ADDRESS_0) && (where <= PCI_BASE_ADDRESS_1)) ||
-           ((header_type != PCI_HEADER_TYPE_BRIDGE) && ((where >= PCI_BASE_ADDRESS_2) &&
-                                                        (where <= PCI_BASE_ADDRESS_5))))
-       {
-               if ((*value & PCI_BASE_ADDRESS_SPACE) == PCI_BASE_ADDRESS_SPACE_IO)
-               {
-                       /*
-                        * Base address register that contains an I/O address. If the
-                        * address is valid on the Hades (0 <= *value < HADES_VIRT_IO_SIZE),
-                        * add 'pci_io_base_virt' to the value.
-                        */
-
-                       if (*value < HADES_VIRT_IO_SIZE)
-                               *value += pci_io_base_virt;
-               }
-               else
-               {
-                       /*
-                        * Base address register that contains an memory address. If the
-                        * address is valid on the Hades (0 <= *value < HADES_MEM_SIZE),
-                        * add HADES_MEM_BASE to the value.
-                        */
-
-                       if (*value == 0)
-                       {
-                               /*
-                                * Base address is 0. Test if this base
-                                * address register is used.
-                                */
-
-                               *pci_addr = 0xffffffff;
-                               if (*pci_addr != 0)
-                               {
-                                       *pci_addr = *value;
-                                       if (*value < HADES_MEM_SIZE)
-                                               *value += HADES_MEM_BASE;
-                               }
-                       }
-                       else
-                       {
-                               if (*value < HADES_MEM_SIZE)
-                                       *value += HADES_MEM_BASE;
-                       }
-               }
-       }
-
-       return PCIBIOS_SUCCESSFUL;
-}
-
-static int hades_write_config_byte(struct pci_dev *dev, int where, u8 value)
-{
-       volatile unsigned char *pci_addr;
-
-       if ((pci_addr = (unsigned char *) mk_conf_addr(dev, where)) == NULL)
-               return PCIBIOS_DEVICE_NOT_FOUND;
-
-       *pci_addr = value;
-
-       return PCIBIOS_SUCCESSFUL;
-}
-
-static int hades_write_config_word(struct pci_dev *dev, int where, u16 value)
-{
-       volatile unsigned short *pci_addr;
-
-       if ((pci_addr = (unsigned short *) mk_conf_addr(dev, where)) == NULL)
-               return PCIBIOS_DEVICE_NOT_FOUND;
-
-       *pci_addr = cpu_to_le16(value);
-
-       return PCIBIOS_SUCCESSFUL;
-}
-
-static int hades_write_config_dword(struct pci_dev *dev, int where, u32 value)
-{
-       volatile unsigned int *pci_addr;
-       unsigned char header_type;
-       int result;
-
-       if ((pci_addr = (unsigned int *) mk_conf_addr(dev, where)) == NULL)
-               return PCIBIOS_DEVICE_NOT_FOUND;
-
-       /*
-        * Check if the value is an address on the bus. If true, subtract the
-        * base address of the PCI memory or PCI I/O area on the Hades.
-        */
-
-       if ((result = hades_read_config_byte(dev, PCI_HEADER_TYPE,
-                                            &header_type)) != PCIBIOS_SUCCESSFUL)
-               return result;
-
-       if (((where >= PCI_BASE_ADDRESS_0) && (where <= PCI_BASE_ADDRESS_1)) ||
-           ((header_type != PCI_HEADER_TYPE_BRIDGE) && ((where >= PCI_BASE_ADDRESS_2) &&
-                                                        (where <= PCI_BASE_ADDRESS_5))))
-       {
-               if ((value & PCI_BASE_ADDRESS_SPACE) ==
-                   PCI_BASE_ADDRESS_SPACE_IO)
-               {
-                       /*
-                        * I/O address. Check if the address is valid address on
-                        * the Hades (pci_io_base_virt <= value < pci_io_base_virt +
-                        * HADES_VIRT_IO_SIZE) or if the value is 0xffffffff. If not
-                        * true do not write the base address register. If it is a
-                        * valid base address subtract 'pci_io_base_virt' from the value.
-                        */
-
-                       if ((value >= pci_io_base_virt) && (value < (pci_io_base_virt +
-                                                                                                                HADES_VIRT_IO_SIZE)))
-                               value -= pci_io_base_virt;
-                       else
-                       {
-                               if (value != 0xffffffff)
-                                       return PCIBIOS_SET_FAILED;
-                       }
-               }
-               else
-               {
-                       /*
-                        * Memory address. Check if the address is valid address on
-                        * the Hades (HADES_MEM_BASE <= value < HADES_MEM_BASE + HADES_MEM_SIZE) or
-                        * if the value is 0xffffffff. If not true do not write
-                        * the base address register. If it is a valid base address
-                        * subtract HADES_MEM_BASE from the value.
-                        */
-
-                       if ((value >= HADES_MEM_BASE) && (value < (HADES_MEM_BASE + HADES_MEM_SIZE)))
-                               value -= HADES_MEM_BASE;
-                       else
-                       {
-                               if (value != 0xffffffff)
-                                       return PCIBIOS_SET_FAILED;
-                       }
-               }
-       }
-
-       *pci_addr = cpu_to_le32(value);
-
-       return PCIBIOS_SUCCESSFUL;
-}
-
-/*
- * static inline void hades_fixup(void)
- *
- * Assign IRQ numbers as used by Linux to the interrupt pins
- * of the PCI cards.
- */
-
-static void __init hades_fixup(int pci_modify)
-{
-       char irq_tab[4] = {
-               [0] = IRQ_TT_MFP_IO0,           /* Slot 0. */
-               [1] = IRQ_TT_MFP_IO1,           /* Slot 1. */
-               [2] = IRQ_TT_MFP_SCC,           /* Slot 2. */
-               [3] = IRQ_TT_MFP_SCSIDMA        /* Slot 3. */
-       };
-       struct pci_dev *dev = NULL;
-       unsigned char slot;
-
-       /*
-        * Go through all devices, fixing up irqs as we see fit:
-        */
-
-       while ((dev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, dev)) != NULL)
-       {
-               if (dev->class >> 16 != PCI_BASE_CLASS_BRIDGE)
-               {
-                       slot = PCI_SLOT(dev->devfn);    /* Determine slot number. */
-                       dev->irq = irq_tab[slot];
-                       if (pci_modify)
-                               pci_write_config_byte(dev, PCI_INTERRUPT_LINE, dev->irq);
-               }
-       }
-}
-
-/*
- * static void hades_conf_device(struct pci_dev *dev)
- *
- * Machine dependent Configure the given device.
- *
- * Parameters:
- *
- * dev         - the pci device.
- */
-
-static void __init hades_conf_device(struct pci_dev *dev)
-{
-       pci_write_config_byte(dev, PCI_CACHE_LINE_SIZE, 0);
-}
-
-static struct pci_ops hades_pci_ops = {
-       .read_byte =    hades_read_config_byte,
-       .read_word =    hades_read_config_word,
-       .read_dword =   hades_read_config_dword,
-       .write_byte =   hades_write_config_byte,
-       .write_word =   hades_write_config_word,
-       .write_dword =  hades_write_config_dword
-};
-
-/*
- * struct pci_bus_info *init_hades_pci(void)
- *
- * Machine specific initialisation:
- *
- * - Allocate and initialise a 'pci_bus_info' structure
- * - Initialise hardware
- *
- * Result: pointer to 'pci_bus_info' structure.
- */
-
-struct pci_bus_info * __init init_hades_pci(void)
-{
-       struct pci_bus_info *bus;
-       int i;
-
-       /*
-        * Remap I/O and configuration space.
-        */
-
-       pci_io_base_virt = (unsigned long) ioremap(HADES_IO_BASE, HADES_VIRT_IO_SIZE);
-
-       for (i = 0; i < N_SLOTS; i++)
-               pci_conf_base_virt[i] = (unsigned long) ioremap(pci_conf_base_phys[i], 0x10000);
-
-       /*
-        * Allocate memory for bus info structure.
-        */
-
-       bus = kzalloc(sizeof(struct pci_bus_info), GFP_KERNEL);
-       if (unlikely(!bus))
-               goto iounmap_base_virt;
-
-       /*
-        * Claim resources. The m68k has no separate I/O space, both
-        * PCI memory space and PCI I/O space are in memory space. Therefore
-        * the I/O resources are requested in memory space as well.
-        */
-
-       if (unlikely(request_resource(&iomem_resource, &config_space) != 0))
-               goto free_bus;
-
-       if (unlikely(request_resource(&iomem_resource, &io_space) != 0))
-               goto release_config_space;
-
-       bus->mem_space.start = HADES_MEM_BASE;
-       bus->mem_space.end = HADES_MEM_BASE + HADES_MEM_SIZE - 1;
-       bus->mem_space.name = pci_mem_name;
-#if 1
-       if (unlikely(request_resource(&iomem_resource, &bus->mem_space) != 0))
-               goto release_io_space;
-#endif
-       bus->io_space.start = pci_io_base_virt;
-       bus->io_space.end = pci_io_base_virt + HADES_VIRT_IO_SIZE - 1;
-       bus->io_space.name = pci_io_name;
-#if 1
-       if (unlikely(request_resource(&ioport_resource, &bus->io_space) != 0))
-               goto release_bus_mem_space;
-#endif
-       /*
-        * Set hardware dependent functions.
-        */
-
-       bus->m68k_pci_ops = &hades_pci_ops;
-       bus->fixup = hades_fixup;
-       bus->conf_device = hades_conf_device;
-
-       /*
-        * Select high to low edge for PCI interrupts.
-        */
-
-       tt_mfp.active_edge &= ~0x27;
-
-       return bus;
-
-release_bus_mem_space:
-       release_resource(&bus->mem_space);
-release_io_space:
-       release_resource(&io_space);
-release_config_space:
-       release_resource(&config_space);
-free_bus:
-       kfree(bus);
-iounmap_base_virt:
-       iounmap((void *)pci_io_base_virt);
-
-       for (i = 0; i < N_SLOTS; i++)
-               iounmap((void *)pci_conf_base_virt[i]);
-
-       return NULL;
-}
-#endif
index e0d3c8b..1edde27 100644 (file)
@@ -20,6 +20,9 @@
 
 #include <asm/atariints.h>
 
+DEFINE_SPINLOCK(rtc_lock);
+EXPORT_SYMBOL_GPL(rtc_lock);
+
 void __init
 atari_sched_init(irq_handler_t timer_routine)
 {
@@ -191,13 +194,14 @@ int atari_tt_hwclk( int op, struct rtc_time *t )
         }
 
         if (!(ctrl & RTC_DM_BINARY)) {
-            BIN_TO_BCD(sec);
-            BIN_TO_BCD(min);
-            BIN_TO_BCD(hour);
-            BIN_TO_BCD(day);
-            BIN_TO_BCD(mon);
-            BIN_TO_BCD(year);
-            if (wday >= 0) BIN_TO_BCD(wday);
+           sec = bin2bcd(sec);
+           min = bin2bcd(min);
+           hour = bin2bcd(hour);
+           day = bin2bcd(day);
+           mon = bin2bcd(mon);
+           year = bin2bcd(year);
+           if (wday >= 0)
+               wday = bin2bcd(wday);
         }
     }
 
@@ -252,13 +256,13 @@ int atari_tt_hwclk( int op, struct rtc_time *t )
        }
 
        if (!(ctrl & RTC_DM_BINARY)) {
-            BCD_TO_BIN(sec);
-            BCD_TO_BIN(min);
-            BCD_TO_BIN(hour);
-            BCD_TO_BIN(day);
-            BCD_TO_BIN(mon);
-            BCD_TO_BIN(year);
-            BCD_TO_BIN(wday);
+           sec = bcd2bin(sec);
+           min = bcd2bin(min);
+           hour = bcd2bin(hour);
+           day = bcd2bin(day);
+           mon = bcd2bin(mon);
+           year = bcd2bin(year);
+           wday = bcd2bin(wday);
         }
 
         if (!(ctrl & RTC_24H)) {
@@ -318,7 +322,7 @@ int atari_tt_set_clock_mmss (unsigned long nowtime)
 
     rtc_minutes = RTC_READ (RTC_MINUTES);
     if (!(save_control & RTC_DM_BINARY))
-        BCD_TO_BIN (rtc_minutes);
+       rtc_minutes = bcd2bin(rtc_minutes);
 
     /* Since we're only adjusting minutes and seconds, don't interfere
        with hour overflow.  This avoids messing with unknown time zones
@@ -329,8 +333,8 @@ int atari_tt_set_clock_mmss (unsigned long nowtime)
         {
             if (!(save_control & RTC_DM_BINARY))
                 {
-                    BIN_TO_BCD (real_seconds);
-                    BIN_TO_BCD (real_minutes);
+                   real_seconds = bin2bcd(real_seconds);
+                   real_minutes = bin2bcd(real_minutes);
                 }
             RTC_WRITE (RTC_SECONDS, real_seconds);
             RTC_WRITE (RTC_MINUTES, real_minutes);
index 9433a88..65c9204 100644 (file)
@@ -25,6 +25,7 @@
 #include <linux/genhd.h>
 #include <linux/rtc.h>
 #include <linux/interrupt.h>
+#include <linux/bcd.h>
 
 #include <asm/bootinfo.h>
 #include <asm/system.h>
@@ -46,9 +47,6 @@ extern void bvme6000_reset (void);
 extern void bvme6000_waitbut(void);
 void bvme6000_set_vectors (void);
 
-static unsigned char bcd2bin (unsigned char b);
-static unsigned char bin2bcd (unsigned char b);
-
 /* Save tick handler routine pointer, will point to do_timer() in
  * kernel/sched.c, called via bvme6000_process_int() */
 
@@ -264,17 +262,6 @@ unsigned long bvme6000_gettimeoffset (void)
     return v;
 }
 
-static unsigned char bcd2bin (unsigned char b)
-{
-       return ((b>>4)*10 + (b&15));
-}
-
-static unsigned char bin2bcd (unsigned char b)
-{
-       return (((b/10)*16) + (b%10));
-}
-
-
 /*
  * Looks like op is non-zero for setting the clock, and zero for
  * reading the clock.
index e8ac3f7..808c901 100644 (file)
@@ -57,16 +57,16 @@ static int rtc_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
                rtc->msr = 0x40;
                memset(&wtime, 0, sizeof(struct rtc_time));
                do {
-                       wtime.tm_sec =  BCD2BIN(rtc->bcd_sec);
-                       wtime.tm_min =  BCD2BIN(rtc->bcd_min);
-                       wtime.tm_hour = BCD2BIN(rtc->bcd_hr);
-                       wtime.tm_mday =  BCD2BIN(rtc->bcd_dom);
-                       wtime.tm_mon =  BCD2BIN(rtc->bcd_mth)-1;
-                       wtime.tm_year = BCD2BIN(rtc->bcd_year);
+                       wtime.tm_sec =  bcd2bin(rtc->bcd_sec);
+                       wtime.tm_min =  bcd2bin(rtc->bcd_min);
+                       wtime.tm_hour = bcd2bin(rtc->bcd_hr);
+                       wtime.tm_mday =  bcd2bin(rtc->bcd_dom);
+                       wtime.tm_mon =  bcd2bin(rtc->bcd_mth)-1;
+                       wtime.tm_year = bcd2bin(rtc->bcd_year);
                        if (wtime.tm_year < 70)
                                wtime.tm_year += 100;
-                       wtime.tm_wday = BCD2BIN(rtc->bcd_dow)-1;
-               } while (wtime.tm_sec != BCD2BIN(rtc->bcd_sec));
+                       wtime.tm_wday = bcd2bin(rtc->bcd_dow)-1;
+               } while (wtime.tm_sec != bcd2bin(rtc->bcd_sec));
                rtc->msr = msr;
                local_irq_restore(flags);
                return copy_to_user(argp, &wtime, sizeof wtime) ?
@@ -114,14 +114,14 @@ static int rtc_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
 
                rtc->t0cr_rtmr = yrs%4;
                rtc->bcd_tenms = 0;
-               rtc->bcd_sec   = BIN2BCD(sec);
-               rtc->bcd_min   = BIN2BCD(min);
-               rtc->bcd_hr    = BIN2BCD(hrs);
-               rtc->bcd_dom   = BIN2BCD(day);
-               rtc->bcd_mth   = BIN2BCD(mon);
-               rtc->bcd_year  = BIN2BCD(yrs%100);
+               rtc->bcd_sec   = bin2bcd(sec);
+               rtc->bcd_min   = bin2bcd(min);
+               rtc->bcd_hr    = bin2bcd(hrs);
+               rtc->bcd_dom   = bin2bcd(day);
+               rtc->bcd_mth   = bin2bcd(mon);
+               rtc->bcd_year  = bin2bcd(yrs%100);
                if (rtc_tm.tm_wday >= 0)
-                       rtc->bcd_dow = BIN2BCD(rtc_tm.tm_wday+1);
+                       rtc->bcd_dow = bin2bcd(rtc_tm.tm_wday+1);
                rtc->t0cr_rtmr = yrs%4 | 0x08;
 
                rtc->msr = msr;
index 3a7f622..55d5d6b 100644 (file)
@@ -14,5 +14,4 @@ obj-y := entry.o process.o traps.o ints.o signal.o ptrace.o module.o \
 
 devres-y = ../../../kernel/irq/devres.o
 
-obj-$(CONFIG_PCI)      += bios32.o
 obj-y$(CONFIG_MMU_SUN3) += dma.o       # no, it's not a typo
diff --git a/arch/m68k/kernel/bios32.c b/arch/m68k/kernel/bios32.c
deleted file mode 100644 (file)
index af170c2..0000000
+++ /dev/null
@@ -1,514 +0,0 @@
-/*
- * bios32.c - PCI BIOS functions for m68k systems.
- *
- * Written by Wout Klaren.
- *
- * Based on the DEC Alpha bios32.c by Dave Rusling and David Mosberger.
- */
-
-#include <linux/init.h>
-#include <linux/kernel.h>
-
-#if 0
-# define DBG_DEVS(args)                printk args
-#else
-# define DBG_DEVS(args)
-#endif
-
-#ifdef CONFIG_PCI
-
-/*
- * PCI support for Linux/m68k. Currently only the Hades is supported.
- *
- * The support for PCI bridges in the DEC Alpha version has
- * been removed in this version.
- */
-
-#include <linux/pci.h>
-#include <linux/slab.h>
-#include <linux/mm.h>
-
-#include <asm/io.h>
-#include <asm/pci.h>
-#include <asm/uaccess.h>
-
-#define KB             1024
-#define MB             (1024*KB)
-#define GB             (1024*MB)
-
-#define MAJOR_REV      0
-#define MINOR_REV      5
-
-/*
- * Align VAL to ALIGN, which must be a power of two.
- */
-
-#define ALIGN(val,align)       (((val) + ((align) - 1)) & ~((align) - 1))
-
-/*
- * Offsets relative to the I/O and memory base addresses from where resources
- * are allocated.
- */
-
-#define IO_ALLOC_OFFSET                0x00004000
-#define MEM_ALLOC_OFFSET       0x04000000
-
-/*
- * Declarations of hardware specific initialisation functions.
- */
-
-extern struct pci_bus_info *init_hades_pci(void);
-
-/*
- * Bus info structure of the PCI bus. A pointer to this structure is
- * put in the sysdata member of the pci_bus structure.
- */
-
-static struct pci_bus_info *bus_info;
-
-static int pci_modify = 1;             /* If set, layout the PCI bus ourself. */
-static int skip_vga;                   /* If set do not modify base addresses
-                                          of vga cards.*/
-static int disable_pci_burst;          /* If set do not allow PCI bursts. */
-
-static unsigned int io_base;
-static unsigned int mem_base;
-
-/*
- * static void disable_dev(struct pci_dev *dev)
- *
- * Disable PCI device DEV so that it does not respond to I/O or memory
- * accesses.
- *
- * Parameters:
- *
- * dev - device to disable.
- */
-
-static void __init disable_dev(struct pci_dev *dev)
-{
-       unsigned short cmd;
-
-       if (((dev->class >> 8 == PCI_CLASS_NOT_DEFINED_VGA) ||
-            (dev->class >> 8 == PCI_CLASS_DISPLAY_VGA) ||
-            (dev->class >> 8 == PCI_CLASS_DISPLAY_XGA)) && skip_vga)
-               return;
-
-       pci_read_config_word(dev, PCI_COMMAND, &cmd);
-
-       cmd &= (~PCI_COMMAND_IO & ~PCI_COMMAND_MEMORY & ~PCI_COMMAND_MASTER);
-       pci_write_config_word(dev, PCI_COMMAND, cmd);
-}
-
-/*
- * static void layout_dev(struct pci_dev *dev)
- *
- * Layout memory and I/O for a device.
- *
- * Parameters:
- *
- * device      - device to layout memory and I/O for.
- */
-
-static void __init layout_dev(struct pci_dev *dev)
-{
-       unsigned short cmd;
-       unsigned int base, mask, size, reg;
-       unsigned int alignto;
-       int i;
-
-       /*
-        * Skip video cards if requested.
-        */
-
-       if (((dev->class >> 8 == PCI_CLASS_NOT_DEFINED_VGA) ||
-            (dev->class >> 8 == PCI_CLASS_DISPLAY_VGA) ||
-            (dev->class >> 8 == PCI_CLASS_DISPLAY_XGA)) && skip_vga)
-               return;
-
-       pci_read_config_word(dev, PCI_COMMAND, &cmd);
-
-       for (reg = PCI_BASE_ADDRESS_0, i = 0; reg <= PCI_BASE_ADDRESS_5; reg += 4, i++)
-       {
-               /*
-                * Figure out how much space and of what type this
-                * device wants.
-                */
-
-               pci_write_config_dword(dev, reg, 0xffffffff);
-               pci_read_config_dword(dev, reg, &base);
-
-               if (!base)
-               {
-                       /* this base-address register is unused */
-                       dev->resource[i].start = 0;
-                       dev->resource[i].end = 0;
-                       dev->resource[i].flags = 0;
-                       continue;
-               }
-
-               /*
-                * We've read the base address register back after
-                * writing all ones and so now we must decode it.
-                */
-
-               if (base & PCI_BASE_ADDRESS_SPACE_IO)
-               {
-                       /*
-                        * I/O space base address register.
-                        */
-
-                       cmd |= PCI_COMMAND_IO;
-
-                       base &= PCI_BASE_ADDRESS_IO_MASK;
-                       mask = (~base << 1) | 0x1;
-                       size = (mask & base) & 0xffffffff;
-
-                       /*
-                        * Align to multiple of size of minimum base.
-                        */
-
-                       alignto = max_t(unsigned int, 0x040, size);
-                       base = ALIGN(io_base, alignto);
-                       io_base = base + size;
-                       pci_write_config_dword(dev, reg, base | PCI_BASE_ADDRESS_SPACE_IO);
-
-                       dev->resource[i].start = base;
-                       dev->resource[i].end = dev->resource[i].start + size - 1;
-                       dev->resource[i].flags = IORESOURCE_IO | PCI_BASE_ADDRESS_SPACE_IO;
-
-                       DBG_DEVS(("layout_dev: IO address: %lX\n", base));
-               }
-               else
-               {
-                       unsigned int type;
-
-                       /*
-                        * Memory space base address register.
-                        */
-
-                       cmd |= PCI_COMMAND_MEMORY;
-                       type = base & PCI_BASE_ADDRESS_MEM_TYPE_MASK;
-                       base &= PCI_BASE_ADDRESS_MEM_MASK;
-                       mask = (~base << 1) | 0x1;
-                       size = (mask & base) & 0xffffffff;
-                       switch (type)
-                       {
-                       case PCI_BASE_ADDRESS_MEM_TYPE_32:
-                       case PCI_BASE_ADDRESS_MEM_TYPE_64:
-                               break;
-
-                       case PCI_BASE_ADDRESS_MEM_TYPE_1M:
-                               printk("bios32 WARNING: slot %d, function %d "
-                                      "requests memory below 1MB---don't "
-                                      "know how to do that.\n",
-                                      PCI_SLOT(dev->devfn),
-                                      PCI_FUNC(dev->devfn));
-                               continue;
-                       }
-
-                       /*
-                        * Align to multiple of size of minimum base.
-                        */
-
-                       alignto = max_t(unsigned int, 0x1000, size);
-                       base = ALIGN(mem_base, alignto);
-                       mem_base = base + size;
-                       pci_write_config_dword(dev, reg, base);
-
-                       dev->resource[i].start = base;
-                       dev->resource[i].end = dev->resource[i].start + size - 1;
-                       dev->resource[i].flags = IORESOURCE_MEM;
-
-                       if (type == PCI_BASE_ADDRESS_MEM_TYPE_64)
-                       {
-                               /*
-                                * 64-bit address, set the highest 32 bits
-                                * to zero.
-                                */
-
-                               reg += 4;
-                               pci_write_config_dword(dev, reg, 0);
-
-                               i++;
-                               dev->resource[i].start = 0;
-                               dev->resource[i].end = 0;
-                               dev->resource[i].flags = 0;
-                       }
-               }
-       }
-
-       /*
-        * Enable device:
-        */
-
-       if (dev->class >> 8 == PCI_CLASS_NOT_DEFINED ||
-           dev->class >> 8 == PCI_CLASS_NOT_DEFINED_VGA ||
-           dev->class >> 8 == PCI_CLASS_DISPLAY_VGA ||
-           dev->class >> 8 == PCI_CLASS_DISPLAY_XGA)
-       {
-               /*
-                * All of these (may) have I/O scattered all around
-                * and may not use i/o-base address registers at all.
-                * So we just have to always enable I/O to these
-                * devices.
-                */
-               cmd |= PCI_COMMAND_IO;
-       }
-
-       pci_write_config_word(dev, PCI_COMMAND, cmd | PCI_COMMAND_MASTER);
-
-       pci_write_config_byte(dev, PCI_LATENCY_TIMER, (disable_pci_burst) ? 0 : 32);
-
-       if (bus_info != NULL)
-               bus_info->conf_device(dev);     /* Machine dependent configuration. */
-
-       DBG_DEVS(("layout_dev: bus %d  slot 0x%x  VID 0x%x  DID 0x%x  class 0x%x\n",
-                 dev->bus->number, PCI_SLOT(dev->devfn), dev->vendor, dev->device, dev->class));
-}
-
-/*
- * static void layout_bus(struct pci_bus *bus)
- *
- * Layout memory and I/O for all devices on the given bus.
- *
- * Parameters:
- *
- * bus - bus.
- */
-
-static void __init layout_bus(struct pci_bus *bus)
-{
-       unsigned int bio, bmem;
-       struct pci_dev *dev;
-
-       DBG_DEVS(("layout_bus: starting bus %d\n", bus->number));
-
-       if (!bus->devices && !bus->children)
-               return;
-
-       /*
-        * Align the current bases on appropriate boundaries (4K for
-        * IO and 1MB for memory).
-        */
-
-       bio = io_base = ALIGN(io_base, 4*KB);
-       bmem = mem_base = ALIGN(mem_base, 1*MB);
-
-       /*
-        * PCI devices might have been setup by a PCI BIOS emulation
-        * running under TOS. In these cases there is a
-        * window during which two devices may have an overlapping
-        * address range. To avoid this causing trouble, we first
-        * turn off the I/O and memory address decoders for all PCI
-        * devices.  They'll be re-enabled only once all address
-        * decoders are programmed consistently.
-        */
-
-       DBG_DEVS(("layout_bus: disable_dev for bus %d\n", bus->number));
-
-       for (dev = bus->devices; dev; dev = dev->sibling)
-       {
-               if ((dev->class >> 16 != PCI_BASE_CLASS_BRIDGE) ||
-                   (dev->class >> 8 == PCI_CLASS_BRIDGE_PCMCIA))
-                       disable_dev(dev);
-       }
-
-       /*
-        * Allocate space to each device:
-        */
-
-       DBG_DEVS(("layout_bus: starting bus %d devices\n", bus->number));
-
-       for (dev = bus->devices; dev; dev = dev->sibling)
-       {
-               if ((dev->class >> 16 != PCI_BASE_CLASS_BRIDGE) ||
-                   (dev->class >> 8 == PCI_CLASS_BRIDGE_PCMCIA))
-                       layout_dev(dev);
-       }
-
-       DBG_DEVS(("layout_bus: bus %d finished\n", bus->number));
-}
-
-/*
- * static void pcibios_fixup(void)
- *
- * Layout memory and I/O of all devices on the PCI bus if 'pci_modify' is
- * true. This might be necessary because not every m68k machine with a PCI
- * bus has a PCI BIOS. This function should be called right after
- * pci_scan_bus() in pcibios_init().
- */
-
-static void __init pcibios_fixup(void)
-{
-       if (pci_modify)
-       {
-               /*
-                * Set base addresses for allocation of I/O and memory space.
-                */
-
-               io_base = bus_info->io_space.start + IO_ALLOC_OFFSET;
-               mem_base = bus_info->mem_space.start + MEM_ALLOC_OFFSET;
-
-               /*
-                * Scan the tree, allocating PCI memory and I/O space.
-                */
-
-               layout_bus(pci_bus_b(pci_root.next));
-       }
-
-       /*
-        * Fix interrupt assignments, etc.
-        */
-
-       bus_info->fixup(pci_modify);
-}
-
-/*
- * static void pcibios_claim_resources(struct pci_bus *bus)
- *
- * Claim all resources that are assigned to devices on the given bus.
- *
- * Parameters:
- *
- * bus - bus.
- */
-
-static void __init pcibios_claim_resources(struct pci_bus *bus)
-{
-       struct pci_dev *dev;
-       int i;
-
-       while (bus)
-       {
-               for (dev = bus->devices; (dev != NULL); dev = dev->sibling)
-               {
-                       for (i = 0; i < PCI_NUM_RESOURCES; i++)
-                       {
-                               struct resource *r = &dev->resource[i];
-                               struct resource *pr;
-                               struct pci_bus_info *bus_info = (struct pci_bus_info *) dev->sysdata;
-
-                               if ((r->start == 0) || (r->parent != NULL))
-                                       continue;
-#if 1
-                               if (r->flags & IORESOURCE_IO)
-                                       pr = &bus_info->io_space;
-                               else
-                                       pr = &bus_info->mem_space;
-#else
-                               if (r->flags & IORESOURCE_IO)
-                                       pr = &ioport_resource;
-                               else
-                                       pr = &iomem_resource;
-#endif
-                               if (request_resource(pr, r) < 0)
-                               {
-                                       printk(KERN_ERR "PCI: Address space collision on region %d of device %s\n", i, dev->name);
-                               }
-                       }
-               }
-
-               if (bus->children)
-                       pcibios_claim_resources(bus->children);
-
-               bus = bus->next;
-       }
-}
-
-/*
- * int pcibios_assign_resource(struct pci_dev *dev, int i)
- *
- * Assign a new address to a PCI resource.
- *
- * Parameters:
- *
- * dev - device.
- * i   - resource.
- *
- * Result: 0 if successful.
- */
-
-int __init pcibios_assign_resource(struct pci_dev *dev, int i)
-{
-       struct resource *r = &dev->resource[i];
-       struct resource *pr = pci_find_parent_resource(dev, r);
-       unsigned long size = r->end + 1;
-
-       if (!pr)
-               return -EINVAL;
-
-       if (r->flags & IORESOURCE_IO)
-       {
-               if (size > 0x100)
-                       return -EFBIG;
-
-               if (allocate_resource(pr, r, size, bus_info->io_space.start +
-                                     IO_ALLOC_OFFSET,  bus_info->io_space.end, 1024))
-                       return -EBUSY;
-       }
-       else
-       {
-               if (allocate_resource(pr, r, size, bus_info->mem_space.start +
-                                     MEM_ALLOC_OFFSET, bus_info->mem_space.end, size))
-                       return -EBUSY;
-       }
-
-       if (i < 6)
-               pci_write_config_dword(dev, PCI_BASE_ADDRESS_0 + 4 * i, r->start);
-
-       return 0;
-}
-
-void __init pcibios_fixup_bus(struct pci_bus *bus)
-{
-       struct pci_dev *dev;
-       void *sysdata;
-
-       sysdata = (bus->parent) ? bus->parent->sysdata : bus->sysdata;
-
-       for (dev = bus->devices; (dev != NULL); dev = dev->sibling)
-               dev->sysdata = sysdata;
-}
-
-void __init pcibios_init(void)
-{
-       printk("Linux/m68k PCI BIOS32 revision %x.%02x\n", MAJOR_REV, MINOR_REV);
-
-       bus_info = NULL;
-#ifdef CONFIG_HADES
-       if (MACH_IS_HADES)
-               bus_info = init_hades_pci();
-#endif
-       if (bus_info != NULL)
-       {
-               printk("PCI: Probing PCI hardware\n");
-               pci_scan_bus(0, bus_info->m68k_pci_ops, bus_info);
-               pcibios_fixup();
-               pcibios_claim_resources(pci_root);
-       }
-       else
-               printk("PCI: No PCI bus detected\n");
-}
-
-char * __init pcibios_setup(char *str)
-{
-       if (!strcmp(str, "nomodify"))
-       {
-               pci_modify = 0;
-               return NULL;
-       }
-       else if (!strcmp(str, "skipvga"))
-       {
-               skip_vga = 1;
-               return NULL;
-       }
-       else if (!strcmp(str, "noburst"))
-       {
-               disable_pci_burst = 1;
-               return NULL;
-       }
-
-       return str;
-}
-#endif /* CONFIG_PCI */
index 6f8c080..2bb4245 100644 (file)
@@ -66,8 +66,8 @@ void dma_free_coherent(struct device *dev, size_t size,
 }
 EXPORT_SYMBOL(dma_free_coherent);
 
-inline void dma_sync_single_for_device(struct device *dev, dma_addr_t handle, size_t size,
-                                      enum dma_data_direction dir)
+void dma_sync_single_for_device(struct device *dev, dma_addr_t handle,
+                               size_t size, enum dma_data_direction dir)
 {
        switch (dir) {
        case DMA_TO_DEVICE:
index ded7dd2..7e8a0d3 100644 (file)
@@ -429,8 +429,9 @@ int show_interrupts(struct seq_file *p, void *v)
        return 0;
 }
 
+#ifdef CONFIG_PROC_FS
 void init_irq_proc(void)
 {
        /* Insert /proc/irq driver here */
 }
-
+#endif
index 7888cdf..3042c2b 100644 (file)
@@ -78,7 +78,7 @@ unsigned long thread_saved_pc(struct task_struct *tsk)
 static void default_idle(void)
 {
        if (!need_resched())
-#if defined(MACH_ATARI_ONLY) && !defined(CONFIG_HADES)
+#if defined(MACH_ATARI_ONLY)
                /* block out HSYNC on the atari (falcon) */
                __asm__("stop #0x2200" : : : "cc");
 #else
index 75b8340..6d813de 100644 (file)
@@ -883,8 +883,7 @@ void show_trace(unsigned long *stack)
                        if (i % 5 == 0)
                                printk("\n       ");
 #endif
-                       printk(" [<%08lx>]", addr);
-                       print_symbol(" %s\n", addr);
+                       printk(" [<%08lx>] %pS\n", addr, (void *)addr);
                        i++;
                }
        }
@@ -900,10 +899,8 @@ void show_registers(struct pt_regs *regs)
        int i;
 
        print_modules();
-       printk("PC: [<%08lx>]",regs->pc);
-       print_symbol(" %s", regs->pc);
-       printk("\nSR: %04x  SP: %p  a2: %08lx\n",
-              regs->sr, regs, regs->a2);
+       printk("PC: [<%08lx>] %pS\n", regs->pc, (void *)regs->pc);
+       printk("SR: %04x  SP: %p  a2: %08lx\n", regs->sr, regs, regs->a2);
        printk("d0: %08lx    d1: %08lx    d2: %08lx    d3: %08lx\n",
               regs->d0, regs->d1, regs->d2, regs->d3);
        printk("d4: %08lx    d5: %08lx    a0: %08lx    a1: %08lx\n",
index 99b0784..f846d4e 100644 (file)
@@ -34,10 +34,10 @@ SECTIONS
        CONSTRUCTORS
        }
 
-  .bss : { *(.bss) }           /* BSS */
-
   . = ALIGN(16);
-  .data.cacheline_aligned : { *(.data.cacheline_aligned) } :data
+  .data.cacheline_aligned : { *(.data.cacheline_aligned) }
+
+  .bss : { *(.bss) }           /* BSS */
 
   _edata = .;                  /* End of data section */
 
@@ -48,7 +48,7 @@ SECTIONS
        _sinittext = .;
        INIT_TEXT
        _einittext = .;
-  }
+  } :data
   .init.data : { INIT_DATA }
   . = ALIGN(16);
   __setup_start = .;
@@ -74,6 +74,7 @@ SECTIONS
   .init.ramfs : { *(.init.ramfs) }
   __initramfs_end = .;
 #endif
+  NOTES
   . = ALIGN(8192);
   __init_end = .;
 
index 46b7d60..df620ac 100644 (file)
@@ -66,8 +66,10 @@ static struct vm_struct *get_io_area(unsigned long size)
        for (p = &iolist; (tmp = *p) ; p = &tmp->next) {
                if (size + addr < (unsigned long)tmp->addr)
                        break;
-               if (addr > KMAP_END-size)
+               if (addr > KMAP_END-size) {
+                       kfree(area);
                        return NULL;
+               }
                addr = tmp->size + (unsigned long)tmp->addr;
        }
        area->addr = (void *)addr;
index 432a9f1..cea5e3e 100644 (file)
@@ -52,15 +52,15 @@ static int rtc_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
                /* Ensure clock and real-time-mode-register are accessible */
                rtc->ctrl = RTC_READ;
                memset(&wtime, 0, sizeof(struct rtc_time));
-               wtime.tm_sec =  BCD2BIN(rtc->bcd_sec);
-               wtime.tm_min =  BCD2BIN(rtc->bcd_min);
-               wtime.tm_hour = BCD2BIN(rtc->bcd_hr);
-               wtime.tm_mday =  BCD2BIN(rtc->bcd_dom);
-               wtime.tm_mon =  BCD2BIN(rtc->bcd_mth)-1;
-               wtime.tm_year = BCD2BIN(rtc->bcd_year);
+               wtime.tm_sec =  bcd2bin(rtc->bcd_sec);
+               wtime.tm_min =  bcd2bin(rtc->bcd_min);
+               wtime.tm_hour = bcd2bin(rtc->bcd_hr);
+               wtime.tm_mday =  bcd2bin(rtc->bcd_dom);
+               wtime.tm_mon =  bcd2bin(rtc->bcd_mth)-1;
+               wtime.tm_year = bcd2bin(rtc->bcd_year);
                if (wtime.tm_year < 70)
                        wtime.tm_year += 100;
-               wtime.tm_wday = BCD2BIN(rtc->bcd_dow)-1;
+               wtime.tm_wday = bcd2bin(rtc->bcd_dow)-1;
                rtc->ctrl = 0;
                local_irq_restore(flags);
                return copy_to_user(argp, &wtime, sizeof wtime) ?
@@ -104,12 +104,12 @@ static int rtc_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
                local_irq_save(flags);
                rtc->ctrl     = RTC_WRITE;
 
-               rtc->bcd_sec  = BIN2BCD(sec);
-               rtc->bcd_min  = BIN2BCD(min);
-               rtc->bcd_hr   = BIN2BCD(hrs);
-               rtc->bcd_dom  = BIN2BCD(day);
-               rtc->bcd_mth  = BIN2BCD(mon);
-               rtc->bcd_year = BIN2BCD(yrs%100);
+               rtc->bcd_sec  = bin2bcd(sec);
+               rtc->bcd_min  = bin2bcd(min);
+               rtc->bcd_hr   = bin2bcd(hrs);
+               rtc->bcd_dom  = bin2bcd(day);
+               rtc->bcd_mth  = bin2bcd(mon);
+               rtc->bcd_year = bin2bcd(yrs%100);
 
                rtc->ctrl     = 0;
                local_irq_restore(flags);
index be9de2f..9c7eefa 100644 (file)
@@ -23,6 +23,7 @@
 #include <linux/serial_reg.h>
 #include <linux/rtc.h>
 #include <linux/vt_kern.h>
+#include <linux/bcd.h>
 
 #include <asm/io.h>
 #include <asm/rtc.h>
@@ -216,17 +217,6 @@ int q40_parse_bootinfo(const struct bi_record *rec)
 }
 
 
-static inline unsigned char bcd2bin(unsigned char b)
-{
-       return (b >> 4) * 10 + (b & 15);
-}
-
-static inline unsigned char bin2bcd(unsigned char b)
-{
-       return (b / 10) * 16 + (b % 10);
-}
-
-
 static unsigned long q40_gettimeoffset(void)
 {
        return 5000 * (ql_ticks != 0);
index f5eaafb..536a04a 100644 (file)
@@ -47,23 +47,23 @@ int sun3x_hwclk(int set, struct rtc_time *t)
 
        if(set) {
                h->csr |= C_WRITE;
-               h->sec = BIN2BCD(t->tm_sec);
-               h->min = BIN2BCD(t->tm_min);
-               h->hour = BIN2BCD(t->tm_hour);
-               h->wday = BIN2BCD(t->tm_wday);
-               h->mday = BIN2BCD(t->tm_mday);
-               h->month = BIN2BCD(t->tm_mon);
-               h->year = BIN2BCD(t->tm_year);
+               h->sec = bin2bcd(t->tm_sec);
+               h->min = bin2bcd(t->tm_min);
+               h->hour = bin2bcd(t->tm_hour);
+               h->wday = bin2bcd(t->tm_wday);
+               h->mday = bin2bcd(t->tm_mday);
+               h->month = bin2bcd(t->tm_mon);
+               h->year = bin2bcd(t->tm_year);
                h->csr &= ~C_WRITE;
        } else {
                h->csr |= C_READ;
-               t->tm_sec = BCD2BIN(h->sec);
-               t->tm_min = BCD2BIN(h->min);
-               t->tm_hour = BCD2BIN(h->hour);
-               t->tm_wday = BCD2BIN(h->wday);
-               t->tm_mday = BCD2BIN(h->mday);
-               t->tm_mon = BCD2BIN(h->month);
-               t->tm_year = BCD2BIN(h->year);
+               t->tm_sec = bcd2bin(h->sec);
+               t->tm_min = bcd2bin(h->min);
+               t->tm_hour = bcd2bin(h->hour);
+               t->tm_wday = bcd2bin(h->wday);
+               t->tm_mday = bcd2bin(h->mday);
+               t->tm_mon = bcd2bin(h->month);
+               t->tm_year = bcd2bin(h->year);
                h->csr &= ~C_READ;
        }
 
index 73008f7..9c93a5b 100644 (file)
 #include <linux/stddef.h>
 #include <asm/processor.h>
 
-static __inline__ int ide_probe_legacy(void)
-{
-#ifdef CONFIG_PCI
-       struct pci_dev *dev;
-       /*
-        * This can be called on the ide_setup() path, super-early in
-        * boot.  But the down_read() will enable local interrupts,
-        * which can cause some machines to crash.  So here we detect
-        * and flag that situation and bail out early.
-        */
-       if (no_pci_devices())
-               return 0;
-       dev = pci_get_class(PCI_CLASS_BRIDGE_EISA << 8, NULL);
-       if (dev)
-               goto found;
-       dev = pci_get_class(PCI_CLASS_BRIDGE_ISA << 8, NULL);
-       if (dev)
-               goto found;
-       return 0;
-found:
-       pci_dev_put(dev);
-       return 1;
-#elif defined(CONFIG_EISA) || defined(CONFIG_ISA)
-       return 1;
-#else
-       return 0;
-#endif
-}
-
 /* MIPS port and memory-mapped I/O string operations.  */
 static inline void __ide_flush_prologue(void)
 {
index a00359e..9606d2b 100644 (file)
@@ -53,11 +53,6 @@ extern struct fd_ops no_fd_ops;
 struct fd_ops *fd_ops;
 #endif
 
-#if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_IDE_MODULE)
-extern struct ide_ops no_ide_ops;
-struct ide_ops *ide_ops;
-#endif
-
 extern struct rtc_ops no_rtc_ops;
 struct rtc_ops *rtc_ops;
 
index 41b4361..02b596b 100644 (file)
@@ -148,6 +148,64 @@ static struct ata_port_operations pcmcia_8bit_port_ops = {
 #define CS_CHECK(fn, ret) \
 do { last_fn = (fn); if ((last_ret = (ret)) != 0) goto cs_failed; } while (0)
 
+
+struct pcmcia_config_check {
+       unsigned long ctl_base;
+       int skip_vcc;
+       int is_kme;
+};
+
+static int pcmcia_check_one_config(struct pcmcia_device *pdev,
+                                  cistpl_cftable_entry_t *cfg,
+                                  cistpl_cftable_entry_t *dflt,
+                                  unsigned int vcc,
+                                  void *priv_data)
+{
+       struct pcmcia_config_check *stk = priv_data;
+
+       /* Check for matching Vcc, unless we're desperate */
+       if (!stk->skip_vcc) {
+               if (cfg->vcc.present & (1 << CISTPL_POWER_VNOM)) {
+                       if (vcc != cfg->vcc.param[CISTPL_POWER_VNOM] / 10000)
+                               return -ENODEV;
+               } else if (dflt->vcc.present & (1 << CISTPL_POWER_VNOM)) {
+                       if (vcc != dflt->vcc.param[CISTPL_POWER_VNOM] / 10000)
+                               return -ENODEV;
+               }
+       }
+
+       if (cfg->vpp1.present & (1 << CISTPL_POWER_VNOM))
+               pdev->conf.Vpp = cfg->vpp1.param[CISTPL_POWER_VNOM] / 10000;
+       else if (dflt->vpp1.present & (1 << CISTPL_POWER_VNOM))
+               pdev->conf.Vpp = dflt->vpp1.param[CISTPL_POWER_VNOM] / 10000;
+
+       if ((cfg->io.nwin > 0) || (dflt->io.nwin > 0)) {
+               cistpl_io_t *io = (cfg->io.nwin) ? &cfg->io : &dflt->io;
+               pdev->io.BasePort1 = io->win[0].base;
+               pdev->io.IOAddrLines = io->flags & CISTPL_IO_LINES_MASK;
+               if (!(io->flags & CISTPL_IO_16BIT))
+                       pdev->io.Attributes1 = IO_DATA_PATH_WIDTH_8;
+               if (io->nwin == 2) {
+                       pdev->io.NumPorts1 = 8;
+                       pdev->io.BasePort2 = io->win[1].base;
+                       pdev->io.NumPorts2 = (stk->is_kme) ? 2 : 1;
+                       if (pcmcia_request_io(pdev, &pdev->io) != 0)
+                               return -ENODEV;
+                       stk->ctl_base = pdev->io.BasePort2;
+               } else if ((io->nwin == 1) && (io->win[0].len >= 16)) {
+                       pdev->io.NumPorts1 = io->win[0].len;
+                       pdev->io.NumPorts2 = 0;
+                       if (pcmcia_request_io(pdev, &pdev->io) != 0)
+                               return -ENODEV;
+                       stk->ctl_base = pdev->io.BasePort1 + 0x0e;
+               } else
+                       return -ENODEV;
+               /* If we've got this far, we're done */
+               return 0;
+       }
+       return -ENODEV;
+}
+
 /**
  *     pcmcia_init_one         -       attach a PCMCIA interface
  *     @pdev: pcmcia device
@@ -161,19 +219,11 @@ static int pcmcia_init_one(struct pcmcia_device *pdev)
        struct ata_host *host;
        struct ata_port *ap;
        struct ata_pcmcia_info *info;
-       tuple_t tuple;
-       struct {
-               unsigned short buf[128];
-               cisparse_t parse;
-               config_info_t conf;
-               cistpl_cftable_entry_t dflt;
-       } *stk = NULL;
-       cistpl_cftable_entry_t *cfg;
-       int pass, last_ret = 0, last_fn = 0, is_kme = 0, ret = -ENOMEM, p;
+       struct pcmcia_config_check *stk = NULL;
+       int last_ret = 0, last_fn = 0, is_kme = 0, ret = -ENOMEM, p;
        unsigned long io_base, ctl_base;
        void __iomem *io_addr, *ctl_addr;
        int n_ports = 1;
-
        struct ata_port_operations *ops = &pcmcia_port_ops;
 
        info = kzalloc(sizeof(*info), GFP_KERNEL);
@@ -193,96 +243,27 @@ static int pcmcia_init_one(struct pcmcia_device *pdev)
        pdev->conf.Attributes = CONF_ENABLE_IRQ;
        pdev->conf.IntType = INT_MEMORY_AND_IO;
 
-       /* Allocate resoure probing structures */
-
-       stk = kzalloc(sizeof(*stk), GFP_KERNEL);
-       if (!stk)
-               goto out1;
-
-       cfg = &stk->parse.cftable_entry;
-
-       /* Tuples we are walking */
-       tuple.TupleData = (cisdata_t *)&stk->buf;
-       tuple.TupleOffset = 0;
-       tuple.TupleDataMax = 255;
-       tuple.Attributes = 0;
-
        /* See if we have a manufacturer identifier. Use it to set is_kme for
           vendor quirks */
        is_kme = ((pdev->manf_id == MANFID_KME) &&
                  ((pdev->card_id == PRODID_KME_KXLC005_A) ||
                   (pdev->card_id == PRODID_KME_KXLC005_B)));
 
-       /* Not sure if this is right... look up the current Vcc */
-       CS_CHECK(GetConfigurationInfo, pcmcia_get_configuration_info(pdev, &stk->conf));
-/*     link->conf.Vcc = stk->conf.Vcc; */
-
-       pass = io_base = ctl_base = 0;
-       tuple.DesiredTuple = CISTPL_CFTABLE_ENTRY;
-       tuple.Attributes = 0;
-       CS_CHECK(GetFirstTuple, pcmcia_get_first_tuple(pdev, &tuple));
-
-       /* Now munch the resources looking for a suitable set */
-       while (1) {
-               if (pcmcia_get_tuple_data(pdev, &tuple) != 0)
-                       goto next_entry;
-               if (pcmcia_parse_tuple(pdev, &tuple, &stk->parse) != 0)
-                       goto next_entry;
-               /* Check for matching Vcc, unless we're desperate */
-               if (!pass) {
-                       if (cfg->vcc.present & (1 << CISTPL_POWER_VNOM)) {
-                               if (stk->conf.Vcc != cfg->vcc.param[CISTPL_POWER_VNOM] / 10000)
-                                       goto next_entry;
-                       } else if (stk->dflt.vcc.present & (1 << CISTPL_POWER_VNOM)) {
-                               if (stk->conf.Vcc != stk->dflt.vcc.param[CISTPL_POWER_VNOM] / 10000)
-                                       goto next_entry;
-                       }
-               }
+       /* Allocate resoure probing structures */
 
-               if (cfg->vpp1.present & (1 << CISTPL_POWER_VNOM))
-                       pdev->conf.Vpp = cfg->vpp1.param[CISTPL_POWER_VNOM] / 10000;
-               else if (stk->dflt.vpp1.present & (1 << CISTPL_POWER_VNOM))
-                       pdev->conf.Vpp = stk->dflt.vpp1.param[CISTPL_POWER_VNOM] / 10000;
-
-               if ((cfg->io.nwin > 0) || (stk->dflt.io.nwin > 0)) {
-                       cistpl_io_t *io = (cfg->io.nwin) ? &cfg->io : &stk->dflt.io;
-                       pdev->conf.ConfigIndex = cfg->index;
-                       pdev->io.BasePort1 = io->win[0].base;
-                       pdev->io.IOAddrLines = io->flags & CISTPL_IO_LINES_MASK;
-                       if (!(io->flags & CISTPL_IO_16BIT))
-                               pdev->io.Attributes1 = IO_DATA_PATH_WIDTH_8;
-                       if (io->nwin == 2) {
-                               pdev->io.NumPorts1 = 8;
-                               pdev->io.BasePort2 = io->win[1].base;
-                               pdev->io.NumPorts2 = (is_kme) ? 2 : 1;
-                               if (pcmcia_request_io(pdev, &pdev->io) != 0)
-                                       goto next_entry;
-                               io_base = pdev->io.BasePort1;
-                               ctl_base = pdev->io.BasePort2;
-                       } else if ((io->nwin == 1) && (io->win[0].len >= 16)) {
-                               pdev->io.NumPorts1 = io->win[0].len;
-                               pdev->io.NumPorts2 = 0;
-                               if (pcmcia_request_io(pdev, &pdev->io) != 0)
-                                       goto next_entry;
-                               io_base = pdev->io.BasePort1;
-                               ctl_base = pdev->io.BasePort1 + 0x0e;
-                       } else
-                               goto next_entry;
-                       /* If we've got this far, we're done */
-                       break;
-               }
-next_entry:
-               if (cfg->flags & CISTPL_CFTABLE_DEFAULT)
-                       memcpy(&stk->dflt, cfg, sizeof(stk->dflt));
-               if (pass) {
-                       CS_CHECK(GetNextTuple, pcmcia_get_next_tuple(pdev, &tuple));
-               } else if (pcmcia_get_next_tuple(pdev, &tuple) != 0) {
-                       CS_CHECK(GetFirstTuple, pcmcia_get_first_tuple(pdev, &tuple));
-                       memset(&stk->dflt, 0, sizeof(stk->dflt));
-                       pass++;
-               }
-       }
+       stk = kzalloc(sizeof(*stk), GFP_KERNEL);
+       if (!stk)
+               goto out1;
+       stk->is_kme = is_kme;
+       stk->skip_vcc = io_base = ctl_base = 0;
 
+       if (pcmcia_loop_config(pdev, pcmcia_check_one_config, stk)) {
+               stk->skip_vcc = 1;
+               if (pcmcia_loop_config(pdev, pcmcia_check_one_config, stk))
+                       goto failed; /* No suitable config found */
+       }
+       io_base = pdev->io.BasePort1;
+       ctl_base = stk->ctl_base;
        CS_CHECK(RequestIRQ, pcmcia_request_irq(pdev, &pdev->irq));
        CS_CHECK(RequestConfiguration, pcmcia_request_configuration(pdev, &pdev->conf));
 
@@ -384,6 +365,7 @@ static struct pcmcia_device_id pcmcia_devices[] = {
        PCMCIA_DEVICE_MANF_CARD(0x0032, 0x0704),
        PCMCIA_DEVICE_MANF_CARD(0x0032, 0x2904),
        PCMCIA_DEVICE_MANF_CARD(0x0045, 0x0401),        /* SanDisk CFA */
+       PCMCIA_DEVICE_MANF_CARD(0x004f, 0x0000),        /* Kingston */
        PCMCIA_DEVICE_MANF_CARD(0x0097, 0x1620),        /* TI emulated */
        PCMCIA_DEVICE_MANF_CARD(0x0098, 0x0000),        /* Toshiba */
        PCMCIA_DEVICE_MANF_CARD(0x00a4, 0x002d),
@@ -404,9 +386,9 @@ static struct pcmcia_device_id pcmcia_devices[] = {
        PCMCIA_DEVICE_PROD_ID12("EXP   ", "CD-ROM", 0x0a5c52fd, 0x66536591),
        PCMCIA_DEVICE_PROD_ID12("EXP   ", "PnPIDE", 0x0a5c52fd, 0x0c694728),
        PCMCIA_DEVICE_PROD_ID12("FREECOM", "PCCARD-IDE", 0x5714cbf7, 0x48e0ab8e),
-       PCMCIA_DEVICE_PROD_ID12("Hyperstone", "Model1", 0x3d5b9ef5, 0xca6ab420),
        PCMCIA_DEVICE_PROD_ID12("HITACHI", "FLASH", 0xf4f43949, 0x9eb86aae),
        PCMCIA_DEVICE_PROD_ID12("HITACHI", "microdrive", 0xf4f43949, 0xa6d76178),
+       PCMCIA_DEVICE_PROD_ID12("Hyperstone", "Model1", 0x3d5b9ef5, 0xca6ab420),
        PCMCIA_DEVICE_PROD_ID12("IBM", "microdrive", 0xb569a6e5, 0xa6d76178),
        PCMCIA_DEVICE_PROD_ID12("IBM", "IBM17JSSFP20", 0xb569a6e5, 0xf2508753),
        PCMCIA_DEVICE_PROD_ID12("KINGSTON", "CF8GB", 0x2e6d1829, 0xacbe682e),
index 49f2741..432cf40 100644 (file)
@@ -1882,10 +1882,6 @@ static int __init atari_floppy_init (void)
                /* Amiga, Mac, ... don't have Atari-compatible floppy :-) */
                return -ENODEV;
 
-       if (MACH_IS_HADES)
-               /* Hades doesn't have Atari-compatible floppy */
-               return -ENODEV;
-
        if (register_blkdev(FLOPPY_MAJOR,"fd"))
                return -EBUSY;
 
index bcf5792..e6ee21d 100644 (file)
@@ -901,23 +901,23 @@ static int bluecard_config(struct pcmcia_device *link)
        for (n = 0; n < 0x400; n += 0x40) {
                link->io.BasePort1 = n ^ 0x300;
                i = pcmcia_request_io(link, &link->io);
-               if (i == CS_SUCCESS)
+               if (i == 0)
                        break;
        }
 
-       if (i != CS_SUCCESS) {
+       if (i != 0) {
                cs_error(link, RequestIO, i);
                goto failed;
        }
 
        i = pcmcia_request_irq(link, &link->irq);
-       if (i != CS_SUCCESS) {
+       if (i != 0) {
                cs_error(link, RequestIRQ, i);
                link->irq.AssignedIRQ = 0;
        }
 
        i = pcmcia_request_configuration(link, &link->conf);
-       if (i != CS_SUCCESS) {
+       if (i != 0) {
                cs_error(link, RequestConfiguration, i);
                goto failed;
        }
index 2705847..2cbe70b 100644 (file)
@@ -678,101 +678,78 @@ static void bt3c_detach(struct pcmcia_device *link)
        kfree(info);
 }
 
-static int get_tuple(struct pcmcia_device *handle, tuple_t *tuple, cisparse_t *parse)
+static int bt3c_check_config(struct pcmcia_device *p_dev,
+                            cistpl_cftable_entry_t *cf,
+                            cistpl_cftable_entry_t *dflt,
+                            unsigned int vcc,
+                            void *priv_data)
 {
-       int i;
-
-       i = pcmcia_get_tuple_data(handle, tuple);
-       if (i != CS_SUCCESS)
-               return i;
-
-       return pcmcia_parse_tuple(handle, tuple, parse);
-}
-
-static int first_tuple(struct pcmcia_device *handle, tuple_t *tuple, cisparse_t *parse)
-{
-       if (pcmcia_get_first_tuple(handle, tuple) != CS_SUCCESS)
-               return CS_NO_MORE_ITEMS;
-       return get_tuple(handle, tuple, parse);
+       unsigned long try = (unsigned long) priv_data;
+
+       if (cf->vpp1.present & (1 << CISTPL_POWER_VNOM))
+               p_dev->conf.Vpp = cf->vpp1.param[CISTPL_POWER_VNOM] / 10000;
+       if ((cf->io.nwin > 0) && (cf->io.win[0].len == 8) &&
+           (cf->io.win[0].base != 0)) {
+               p_dev->io.BasePort1 = cf->io.win[0].base;
+               p_dev->io.IOAddrLines = (try == 0) ? 16 :
+                       cf->io.flags & CISTPL_IO_LINES_MASK;
+               if (!pcmcia_request_io(p_dev, &p_dev->io))
+                       return 0;
+       }
+       return -ENODEV;
 }
 
-static int next_tuple(struct pcmcia_device *handle, tuple_t *tuple, cisparse_t *parse)
+static int bt3c_check_config_notpicky(struct pcmcia_device *p_dev,
+                                     cistpl_cftable_entry_t *cf,
+                                     cistpl_cftable_entry_t *dflt,
+                                     unsigned int vcc,
+                                     void *priv_data)
 {
-       if (pcmcia_get_next_tuple(handle, tuple) != CS_SUCCESS)
-               return CS_NO_MORE_ITEMS;
-       return get_tuple(handle, tuple, parse);
+       static unsigned int base[5] = { 0x3f8, 0x2f8, 0x3e8, 0x2e8, 0x0 };
+       int j;
+
+       if ((cf->io.nwin > 0) && ((cf->io.flags & CISTPL_IO_LINES_MASK) <= 3)) {
+               for (j = 0; j < 5; j++) {
+                       p_dev->io.BasePort1 = base[j];
+                       p_dev->io.IOAddrLines = base[j] ? 16 : 3;
+                       if (!pcmcia_request_io(p_dev, &p_dev->io))
+                               return 0;
+               }
+       }
+       return -ENODEV;
 }
 
 static int bt3c_config(struct pcmcia_device *link)
 {
-       static unsigned int base[5] = { 0x3f8, 0x2f8, 0x3e8, 0x2e8, 0x0 };
        bt3c_info_t *info = link->priv;
-       tuple_t tuple;
-       u_short buf[256];
-       cisparse_t parse;
-       cistpl_cftable_entry_t *cf = &parse.cftable_entry;
-       int i, j, try;
-
-       /* First pass: look for a config entry that looks normal. */
-       tuple.TupleData = (cisdata_t *)buf;
-       tuple.TupleOffset = 0;
-       tuple.TupleDataMax = 255;
-       tuple.Attributes = 0;
-       tuple.DesiredTuple = CISTPL_CFTABLE_ENTRY;
-       /* Two tries: without IO aliases, then with aliases */
-       for (try = 0; try < 2; try++) {
-               i = first_tuple(link, &tuple, &parse);
-               while (i != CS_NO_MORE_ITEMS) {
-                       if (i != CS_SUCCESS)
-                               goto next_entry;
-                       if (cf->vpp1.present & (1 << CISTPL_POWER_VNOM))
-                               link->conf.Vpp = cf->vpp1.param[CISTPL_POWER_VNOM] / 10000;
-                       if ((cf->io.nwin > 0) && (cf->io.win[0].len == 8) && (cf->io.win[0].base != 0)) {
-                               link->conf.ConfigIndex = cf->index;
-                               link->io.BasePort1 = cf->io.win[0].base;
-                               link->io.IOAddrLines = (try == 0) ? 16 : cf->io.flags & CISTPL_IO_LINES_MASK;
-                               i = pcmcia_request_io(link, &link->io);
-                               if (i == CS_SUCCESS)
-                                       goto found_port;
-                       }
-next_entry:
-                       i = next_tuple(link, &tuple, &parse);
-               }
-       }
+       int i;
+       unsigned long try;
+
+       /* First pass: look for a config entry that looks normal.
+          Two tries: without IO aliases, then with aliases */
+       for (try = 0; try < 2; try++)
+               if (!pcmcia_loop_config(link, bt3c_check_config, (void *) try))
+                       goto found_port;
 
        /* Second pass: try to find an entry that isn't picky about
           its base address, then try to grab any standard serial port
           address, and finally try to get any free port. */
-       i = first_tuple(link, &tuple, &parse);
-       while (i != CS_NO_MORE_ITEMS) {
-               if ((i == CS_SUCCESS) && (cf->io.nwin > 0) && ((cf->io.flags & CISTPL_IO_LINES_MASK) <= 3)) {
-                       link->conf.ConfigIndex = cf->index;
-                       for (j = 0; j < 5; j++) {
-                               link->io.BasePort1 = base[j];
-                               link->io.IOAddrLines = base[j] ? 16 : 3;
-                               i = pcmcia_request_io(link, &link->io);
-                               if (i == CS_SUCCESS)
-                                       goto found_port;
-                       }
-               }
-               i = next_tuple(link, &tuple, &parse);
-       }
+       if (!pcmcia_loop_config(link, bt3c_check_config_notpicky, NULL))
+               goto found_port;
 
-found_port:
-       if (i != CS_SUCCESS) {
-               BT_ERR("No usable port range found");
-               cs_error(link, RequestIO, i);
-               goto failed;
-       }
+       BT_ERR("No usable port range found");
+       cs_error(link, RequestIO, -ENODEV);
+       goto failed;
 
+found_port:
        i = pcmcia_request_irq(link, &link->irq);
-       if (i != CS_SUCCESS) {
+       if (i != 0) {
                cs_error(link, RequestIRQ, i);
                link->irq.AssignedIRQ = 0;
        }
 
        i = pcmcia_request_configuration(link, &link->conf);
-       if (i != CS_SUCCESS) {
+       if (i != 0) {
                cs_error(link, RequestConfiguration, i);
                goto failed;
        }
index 68d1d25..8e556b7 100644 (file)
@@ -607,102 +607,78 @@ static void btuart_detach(struct pcmcia_device *link)
        kfree(info);
 }
 
-static int get_tuple(struct pcmcia_device *handle, tuple_t *tuple, cisparse_t *parse)
+static int btuart_check_config(struct pcmcia_device *p_dev,
+                              cistpl_cftable_entry_t *cf,
+                              cistpl_cftable_entry_t *dflt,
+                              unsigned int vcc,
+                              void *priv_data)
 {
-       int i;
-
-       i = pcmcia_get_tuple_data(handle, tuple);
-       if (i != CS_SUCCESS)
-               return i;
-
-       return pcmcia_parse_tuple(handle, tuple, parse);
-}
-
-static int first_tuple(struct pcmcia_device *handle, tuple_t *tuple, cisparse_t *parse)
-{
-       if (pcmcia_get_first_tuple(handle, tuple) != CS_SUCCESS)
-               return CS_NO_MORE_ITEMS;
-       return get_tuple(handle, tuple, parse);
+       int *try = priv_data;
+
+       if (cf->vpp1.present & (1 << CISTPL_POWER_VNOM))
+               p_dev->conf.Vpp = cf->vpp1.param[CISTPL_POWER_VNOM] / 10000;
+       if ((cf->io.nwin > 0) && (cf->io.win[0].len == 8) &&
+           (cf->io.win[0].base != 0)) {
+               p_dev->io.BasePort1 = cf->io.win[0].base;
+               p_dev->io.IOAddrLines = (*try == 0) ? 16 :
+                       cf->io.flags & CISTPL_IO_LINES_MASK;
+               if (!pcmcia_request_io(p_dev, &p_dev->io))
+                       return 0;
+       }
+       return -ENODEV;
 }
 
-static int next_tuple(struct pcmcia_device *handle, tuple_t *tuple, cisparse_t *parse)
+static int btuart_check_config_notpicky(struct pcmcia_device *p_dev,
+                                       cistpl_cftable_entry_t *cf,
+                                       cistpl_cftable_entry_t *dflt,
+                                       unsigned int vcc,
+                                       void *priv_data)
 {
-       if (pcmcia_get_next_tuple(handle, tuple) != CS_SUCCESS)
-               return CS_NO_MORE_ITEMS;
-       return get_tuple(handle, tuple, parse);
+       static unsigned int base[5] = { 0x3f8, 0x2f8, 0x3e8, 0x2e8, 0x0 };
+       int j;
+
+       if ((cf->io.nwin > 0) && ((cf->io.flags & CISTPL_IO_LINES_MASK) <= 3)) {
+               for (j = 0; j < 5; j++) {
+                       p_dev->io.BasePort1 = base[j];
+                       p_dev->io.IOAddrLines = base[j] ? 16 : 3;
+                       if (!pcmcia_request_io(p_dev, &p_dev->io))
+                               return 0;
+               }
+       }
+       return -ENODEV;
 }
 
 static int btuart_config(struct pcmcia_device *link)
 {
-       static unsigned int base[5] = { 0x3f8, 0x2f8, 0x3e8, 0x2e8, 0x0 };
        btuart_info_t *info = link->priv;
-       tuple_t tuple;
-       u_short buf[256];
-       cisparse_t parse;
-       cistpl_cftable_entry_t *cf = &parse.cftable_entry;
-       int i, j, try;
-
-       /* First pass: look for a config entry that looks normal. */
-       tuple.TupleData = (cisdata_t *) buf;
-       tuple.TupleOffset = 0;
-       tuple.TupleDataMax = 255;
-       tuple.Attributes = 0;
-       tuple.DesiredTuple = CISTPL_CFTABLE_ENTRY;
-       /* Two tries: without IO aliases, then with aliases */
-       for (try = 0; try < 2; try++) {
-               i = first_tuple(link, &tuple, &parse);
-               while (i != CS_NO_MORE_ITEMS) {
-                       if (i != CS_SUCCESS)
-                               goto next_entry;
-                       if (cf->vpp1.present & (1 << CISTPL_POWER_VNOM))
-                               link->conf.Vpp = cf->vpp1.param[CISTPL_POWER_VNOM] / 10000;
-                       if ((cf->io.nwin > 0) && (cf->io.win[0].len == 8) && (cf->io.win[0].base != 0)) {
-                               link->conf.ConfigIndex = cf->index;
-                               link->io.BasePort1 = cf->io.win[0].base;
-                               link->io.IOAddrLines = (try == 0) ? 16 : cf->io.flags & CISTPL_IO_LINES_MASK;
-                               i = pcmcia_request_io(link, &link->io);
-                               if (i == CS_SUCCESS)
-                                       goto found_port;
-                       }
-next_entry:
-                       i = next_tuple(link, &tuple, &parse);
-               }
-       }
+       int i;
+       int try;
+
+       /* First pass: look for a config entry that looks normal.
+          Two tries: without IO aliases, then with aliases */
+       for (try = 0; try < 2; try++)
+               if (!pcmcia_loop_config(link, btuart_check_config, &try))
+                       goto found_port;
 
        /* Second pass: try to find an entry that isn't picky about
           its base address, then try to grab any standard serial port
           address, and finally try to get any free port. */
-       i = first_tuple(link, &tuple, &parse);
-       while (i != CS_NO_MORE_ITEMS) {
-               if ((i == CS_SUCCESS) && (cf->io.nwin > 0)
-                   && ((cf->io.flags & CISTPL_IO_LINES_MASK) <= 3)) {
-                       link->conf.ConfigIndex = cf->index;
-                       for (j = 0; j < 5; j++) {
-                               link->io.BasePort1 = base[j];
-                               link->io.IOAddrLines = base[j] ? 16 : 3;
-                               i = pcmcia_request_io(link, &link->io);
-                               if (i == CS_SUCCESS)
-                                       goto found_port;
-                       }
-               }
-               i = next_tuple(link, &tuple, &parse);
-       }
+       if (!pcmcia_loop_config(link, btuart_check_config_notpicky, NULL))
+               goto found_port;
 
-found_port:
-       if (i != CS_SUCCESS) {
-               BT_ERR("No usable port range found");
-               cs_error(link, RequestIO, i);
-               goto failed;
-       }
+       BT_ERR("No usable port range found");
+       cs_error(link, RequestIO, -ENODEV);
+       goto failed;
 
+found_port:
        i = pcmcia_request_irq(link, &link->irq);
-       if (i != CS_SUCCESS) {
+       if (i != 0) {
                cs_error(link, RequestIRQ, i);
                link->irq.AssignedIRQ = 0;
        }
 
        i = pcmcia_request_configuration(link, &link->conf);
-       if (i != CS_SUCCESS) {
+       if (i != 0) {
                cs_error(link, RequestConfiguration, i);
                goto failed;
        }
index dae45cd..e6e6b03 100644 (file)
@@ -590,75 +590,40 @@ static void dtl1_detach(struct pcmcia_device *link)
        kfree(info);
 }
 
-static int get_tuple(struct pcmcia_device *handle, tuple_t *tuple, cisparse_t *parse)
+static int dtl1_confcheck(struct pcmcia_device *p_dev,
+                         cistpl_cftable_entry_t *cf,
+                         cistpl_cftable_entry_t *dflt,
+                         unsigned int vcc,
+                         void *priv_data)
 {
-       int i;
-
-       i = pcmcia_get_tuple_data(handle, tuple);
-       if (i != CS_SUCCESS)
-               return i;
-
-       return pcmcia_parse_tuple(handle, tuple, parse);
-}
-
-static int first_tuple(struct pcmcia_device *handle, tuple_t *tuple, cisparse_t *parse)
-{
-       if (pcmcia_get_first_tuple(handle, tuple) != CS_SUCCESS)
-               return CS_NO_MORE_ITEMS;
-       return get_tuple(handle, tuple, parse);
-}
-
-static int next_tuple(struct pcmcia_device *handle, tuple_t *tuple, cisparse_t *parse)
-{
-       if (pcmcia_get_next_tuple(handle, tuple) != CS_SUCCESS)
-               return CS_NO_MORE_ITEMS;
-       return get_tuple(handle, tuple, parse);
+       if ((cf->io.nwin == 1) && (cf->io.win[0].len > 8)) {
+               p_dev->io.BasePort1 = cf->io.win[0].base;
+               p_dev->io.NumPorts1 = cf->io.win[0].len;        /*yo */
+               p_dev->io.IOAddrLines = cf->io.flags & CISTPL_IO_LINES_MASK;
+               if (!pcmcia_request_io(p_dev, &p_dev->io))
+                       return 0;
+       }
+       return -ENODEV;
 }
 
 static int dtl1_config(struct pcmcia_device *link)
 {
        dtl1_info_t *info = link->priv;
-       tuple_t tuple;
-       u_short buf[256];
-       cisparse_t parse;
-       cistpl_cftable_entry_t *cf = &parse.cftable_entry;
        int i;
 
-       tuple.TupleData = (cisdata_t *)buf;
-       tuple.TupleOffset = 0;
-       tuple.TupleDataMax = 255;
-       tuple.Attributes = 0;
-       tuple.DesiredTuple = CISTPL_CFTABLE_ENTRY;
-
        /* Look for a generic full-sized window */
        link->io.NumPorts1 = 8;
-       i = first_tuple(link, &tuple, &parse);
-       while (i != CS_NO_MORE_ITEMS) {
-               if ((i == CS_SUCCESS) && (cf->io.nwin == 1) && (cf->io.win[0].len > 8)) {
-                       link->conf.ConfigIndex = cf->index;
-                       link->io.BasePort1 = cf->io.win[0].base;
-                       link->io.NumPorts1 = cf->io.win[0].len; /*yo */
-                       link->io.IOAddrLines = cf->io.flags & CISTPL_IO_LINES_MASK;
-                       i = pcmcia_request_io(link, &link->io);
-                       if (i == CS_SUCCESS)
-                               break;
-               }
-               i = next_tuple(link, &tuple, &parse);
-       }
-
-       if (i != CS_SUCCESS) {
-               cs_error(link, RequestIO, i);
+       if (!pcmcia_loop_config(link, dtl1_confcheck, NULL))
                goto failed;
-       }
 
        i = pcmcia_request_irq(link, &link->irq);
-       if (i != CS_SUCCESS) {
+       if (i != 0) {
                cs_error(link, RequestIRQ, i);
                link->irq.AssignedIRQ = 0;
        }
 
        i = pcmcia_request_configuration(link, &link->conf);
-       if (i != CS_SUCCESS) {
+       if (i != 0) {
                cs_error(link, RequestConfiguration, i);
                goto failed;
        }
index f070ae7..1c5bf99 100644 (file)
@@ -1759,65 +1759,40 @@ static void cmm_cm4000_release(struct pcmcia_device * link)
 
 /*==== Interface to PCMCIA Layer =======================================*/
 
+static int cm4000_config_check(struct pcmcia_device *p_dev,
+                              cistpl_cftable_entry_t *cfg,
+                              cistpl_cftable_entry_t *dflt,
+                              unsigned int vcc,
+                              void *priv_data)
+{
+       if (!cfg->io.nwin)
+               return -ENODEV;
+
+       /* Get the IOaddr */
+       p_dev->io.BasePort1 = cfg->io.win[0].base;
+       p_dev->io.NumPorts1 = cfg->io.win[0].len;
+       p_dev->io.Attributes1 = IO_DATA_PATH_WIDTH_AUTO;
+       if (!(cfg->io.flags & CISTPL_IO_8BIT))
+               p_dev->io.Attributes1 = IO_DATA_PATH_WIDTH_16;
+       if (!(cfg->io.flags & CISTPL_IO_16BIT))
+               p_dev->io.Attributes1 = IO_DATA_PATH_WIDTH_8;
+       p_dev->io.IOAddrLines = cfg->io.flags & CISTPL_IO_LINES_MASK;
+
+       return pcmcia_request_io(p_dev, &p_dev->io);
+}
+
 static int cm4000_config(struct pcmcia_device * link, int devno)
 {
        struct cm4000_dev *dev;
-       tuple_t tuple;
-       cisparse_t parse;
-       u_char buf[64];
-       int fail_fn, fail_rc;
-       int rc;
 
        /* read the config-tuples */
-       tuple.Attributes = 0;
-       tuple.TupleData = buf;
-       tuple.TupleDataMax = sizeof(buf);
-       tuple.TupleOffset = 0;
-
-       link->io.BasePort2 = 0;
-       link->io.NumPorts2 = 0;
-       link->io.Attributes2 = 0;
-       tuple.DesiredTuple = CISTPL_CFTABLE_ENTRY;
-       for (rc = pcmcia_get_first_tuple(link, &tuple);
-            rc == CS_SUCCESS; rc = pcmcia_get_next_tuple(link, &tuple)) {
-
-               rc = pcmcia_get_tuple_data(link, &tuple);
-               if (rc != CS_SUCCESS)
-                       continue;
-               rc = pcmcia_parse_tuple(link, &tuple, &parse);
-               if (rc != CS_SUCCESS)
-                       continue;
-
-               link->conf.ConfigIndex = parse.cftable_entry.index;
-
-               if (!parse.cftable_entry.io.nwin)
-                       continue;
-
-               /* Get the IOaddr */
-               link->io.BasePort1 = parse.cftable_entry.io.win[0].base;
-               link->io.NumPorts1 = parse.cftable_entry.io.win[0].len;
-               link->io.Attributes1 = IO_DATA_PATH_WIDTH_AUTO;
-               if (!(parse.cftable_entry.io.flags & CISTPL_IO_8BIT))
-                       link->io.Attributes1 = IO_DATA_PATH_WIDTH_16;
-               if (!(parse.cftable_entry.io.flags & CISTPL_IO_16BIT))
-                       link->io.Attributes1 = IO_DATA_PATH_WIDTH_8;
-               link->io.IOAddrLines = parse.cftable_entry.io.flags
-                   & CISTPL_IO_LINES_MASK;
-
-               rc = pcmcia_request_io(link, &link->io);
-               if (rc == CS_SUCCESS)
-                       break;  /* we are done */
-       }
-       if (rc != CS_SUCCESS)
+       if (pcmcia_loop_config(link, cm4000_config_check, NULL))
                goto cs_release;
 
        link->conf.IntType = 00000002;
 
-       if ((fail_rc =
-            pcmcia_request_configuration(link, &link->conf)) != CS_SUCCESS) {
-               fail_fn = RequestConfiguration;
+       if (pcmcia_request_configuration(link, &link->conf))
                goto cs_release;
-       }
 
        dev = link->priv;
        sprintf(dev->node.dev_name, DEVICE_NAME "%d", devno);
index 0b5934b..2d7c906 100644 (file)
@@ -526,65 +526,49 @@ static void cm4040_reader_release(struct pcmcia_device *link)
        return;
 }
 
-static int reader_config(struct pcmcia_device *link, int devno)
+static int cm4040_config_check(struct pcmcia_device *p_dev,
+                              cistpl_cftable_entry_t *cfg,
+                              cistpl_cftable_entry_t *dflt,
+                              unsigned int vcc,
+                              void *priv_data)
 {
-       struct reader_dev *dev;
-       tuple_t tuple;
-       cisparse_t parse;
-       u_char buf[64];
-       int fail_fn, fail_rc;
        int rc;
+       if (!cfg->io.nwin)
+               return -ENODEV;
+
+       /* Get the IOaddr */
+       p_dev->io.BasePort1 = cfg->io.win[0].base;
+       p_dev->io.NumPorts1 = cfg->io.win[0].len;
+       p_dev->io.Attributes1 = IO_DATA_PATH_WIDTH_AUTO;
+       if (!(cfg->io.flags & CISTPL_IO_8BIT))
+               p_dev->io.Attributes1 = IO_DATA_PATH_WIDTH_16;
+       if (!(cfg->io.flags & CISTPL_IO_16BIT))
+               p_dev->io.Attributes1 = IO_DATA_PATH_WIDTH_8;
+       p_dev->io.IOAddrLines = cfg->io.flags & CISTPL_IO_LINES_MASK;
+
+       rc = pcmcia_request_io(p_dev, &p_dev->io);
+       dev_printk(KERN_INFO, &handle_to_dev(p_dev),
+                  "pcmcia_request_io returned 0x%x\n", rc);
+       return rc;
+}
+
 
-       tuple.Attributes = 0;
-       tuple.TupleData = buf;
-       tuple.TupleDataMax = sizeof(buf);
-       tuple.TupleOffset = 0;
+static int reader_config(struct pcmcia_device *link, int devno)
+{
+       struct reader_dev *dev;
+       int fail_rc;
 
        link->io.BasePort2 = 0;
        link->io.NumPorts2 = 0;
        link->io.Attributes2 = 0;
-       tuple.DesiredTuple = CISTPL_CFTABLE_ENTRY;
-       for (rc = pcmcia_get_first_tuple(link, &tuple);
-            rc == CS_SUCCESS;
-            rc = pcmcia_get_next_tuple(link, &tuple)) {
-               rc = pcmcia_get_tuple_data(link, &tuple);
-               if (rc != CS_SUCCESS)
-                       continue;
-               rc = pcmcia_parse_tuple(link, &tuple, &parse);
-               if (rc != CS_SUCCESS)
-                       continue;
-
-               link->conf.ConfigIndex = parse.cftable_entry.index;
-
-               if (!parse.cftable_entry.io.nwin)
-                       continue;
-
-               link->io.BasePort1 = parse.cftable_entry.io.win[0].base;
-               link->io.NumPorts1 = parse.cftable_entry.io.win[0].len;
-               link->io.Attributes1 = IO_DATA_PATH_WIDTH_AUTO;
-               if (!(parse.cftable_entry.io.flags & CISTPL_IO_8BIT))
-                       link->io.Attributes1 = IO_DATA_PATH_WIDTH_16;
-               if (!(parse.cftable_entry.io.flags & CISTPL_IO_16BIT))
-                       link->io.Attributes1 = IO_DATA_PATH_WIDTH_8;
-               link->io.IOAddrLines = parse.cftable_entry.io.flags
-                                               & CISTPL_IO_LINES_MASK;
-               rc = pcmcia_request_io(link, &link->io);
-
-               dev_printk(KERN_INFO, &handle_to_dev(link), "foo");
-               if (rc == CS_SUCCESS)
-                       break;
-               else
-                       dev_printk(KERN_INFO, &handle_to_dev(link),
-                                  "pcmcia_request_io failed 0x%x\n", rc);
-       }
-       if (rc != CS_SUCCESS)
+
+       if (pcmcia_loop_config(link, cm4040_config_check, NULL))
                goto cs_release;
 
        link->conf.IntType = 00000002;
 
-       if ((fail_rc = pcmcia_request_configuration(link,&link->conf))
-                                                               !=CS_SUCCESS) {
-               fail_fn = RequestConfiguration;
+       fail_rc = pcmcia_request_configuration(link, &link->conf);
+       if (fail_rc != 0) {
                dev_printk(KERN_INFO, &handle_to_dev(link),
                           "pcmcia_request_configuration failed 0x%x\n",
                           fail_rc);
index 5eca7a9..5216fce 100644 (file)
@@ -65,9 +65,9 @@ static void signalled_reboot_work(struct work_struct *work_reboot)
        struct ipw_dev *ipw = container_of(work_reboot, struct ipw_dev,
                        work_reboot);
        struct pcmcia_device *link = ipw->link;
-       int ret = pccard_reset_card(link->socket);
+       int ret = pcmcia_reset_card(link->socket);
 
-       if (ret != CS_SUCCESS)
+       if (ret != 0)
                cs_error(link, ResetCard, ret);
 }
 
@@ -83,7 +83,6 @@ static int config_ipwireless(struct ipw_dev *ipw)
 {
        struct pcmcia_device *link = ipw->link;
        int ret;
-       config_info_t conf;
        tuple_t tuple;
        unsigned short buf[64];
        cisparse_t parse;
@@ -105,7 +104,7 @@ static int config_ipwireless(struct ipw_dev *ipw)
        while (ret == 0) {
                ret = pcmcia_get_tuple_data(link, &tuple);
 
-               if (ret != CS_SUCCESS) {
+               if (ret != 0) {
                        cs_error(link, GetTupleData, ret);
                        goto exit0;
                }
@@ -116,21 +115,21 @@ static int config_ipwireless(struct ipw_dev *ipw)
 
        ret = pcmcia_get_first_tuple(link, &tuple);
 
-       if (ret != CS_SUCCESS) {
+       if (ret != 0) {
                cs_error(link, GetFirstTuple, ret);
                goto exit0;
        }
 
        ret = pcmcia_get_tuple_data(link, &tuple);
 
-       if (ret != CS_SUCCESS) {
+       if (ret != 0) {
                cs_error(link, GetTupleData, ret);
                goto exit0;
        }
 
-       ret = pcmcia_parse_tuple(link, &tuple, &parse);
+       ret = pcmcia_parse_tuple(&tuple, &parse);
 
-       if (ret != CS_SUCCESS) {
+       if (ret != 0) {
                cs_error(link, ParseTuple, ret);
                goto exit0;
        }
@@ -152,21 +151,21 @@ static int config_ipwireless(struct ipw_dev *ipw)
 
        ret = pcmcia_get_first_tuple(link, &tuple);
 
-       if (ret != CS_SUCCESS) {
+       if (ret != 0) {
                cs_error(link, GetFirstTuple, ret);
                goto exit0;
        }
 
        ret = pcmcia_get_tuple_data(link, &tuple);
 
-       if (ret != CS_SUCCESS) {
+       if (ret != 0) {
                cs_error(link, GetTupleData, ret);
                goto exit0;
        }
 
-       ret = pcmcia_parse_tuple(link, &tuple, &parse);
+       ret = pcmcia_parse_tuple(&tuple, &parse);
 
-       if (ret != CS_SUCCESS) {
+       if (ret != 0) {
                cs_error(link, GetTupleData, ret);
                goto exit0;
        }
@@ -181,7 +180,7 @@ static int config_ipwireless(struct ipw_dev *ipw)
 
        ret = pcmcia_request_io(link, &link->io);
 
-       if (ret != CS_SUCCESS) {
+       if (ret != 0) {
                cs_error(link, RequestIO, ret);
                goto exit0;
        }
@@ -195,21 +194,21 @@ static int config_ipwireless(struct ipw_dev *ipw)
 
        ret = pcmcia_get_first_tuple(link, &tuple);
 
-       if (ret != CS_SUCCESS) {
+       if (ret != 0) {
                cs_error(link, GetFirstTuple, ret);
                goto exit1;
        }
 
        ret = pcmcia_get_tuple_data(link, &tuple);
 
-       if (ret != CS_SUCCESS) {
+       if (ret != 0) {
                cs_error(link, GetTupleData, ret);
                goto exit1;
        }
 
-       ret = pcmcia_parse_tuple(link, &tuple, &parse);
+       ret = pcmcia_parse_tuple(&tuple, &parse);
 
-       if (ret != CS_SUCCESS) {
+       if (ret != 0) {
                cs_error(link, ParseTuple, ret);
                goto exit1;
        }
@@ -227,7 +226,7 @@ static int config_ipwireless(struct ipw_dev *ipw)
                ret = pcmcia_request_window(&link, &ipw->request_common_memory,
                                &ipw->handle_common_memory);
 
-               if (ret != CS_SUCCESS) {
+               if (ret != 0) {
                        cs_error(link, RequestWindow, ret);
                        goto exit1;
                }
@@ -239,7 +238,7 @@ static int config_ipwireless(struct ipw_dev *ipw)
                ret = pcmcia_map_mem_page(ipw->handle_common_memory,
                                &memreq_common_memory);
 
-               if (ret != CS_SUCCESS) {
+               if (ret != 0) {
                        cs_error(link, MapMemPage, ret);
                        goto exit1;
                }
@@ -261,7 +260,7 @@ static int config_ipwireless(struct ipw_dev *ipw)
                ret = pcmcia_request_window(&link, &ipw->request_attr_memory,
                                &ipw->handle_attr_memory);
 
-               if (ret != CS_SUCCESS) {
+               if (ret != 0) {
                        cs_error(link, RequestWindow, ret);
                        goto exit2;
                }
@@ -272,7 +271,7 @@ static int config_ipwireless(struct ipw_dev *ipw)
                ret = pcmcia_map_mem_page(ipw->handle_attr_memory,
                                &memreq_attr_memory);
 
-               if (ret != CS_SUCCESS) {
+               if (ret != 0) {
                        cs_error(link, MapMemPage, ret);
                        goto exit2;
                }
@@ -292,20 +291,11 @@ static int config_ipwireless(struct ipw_dev *ipw)
 
        ret = pcmcia_request_irq(link, &link->irq);
 
-       if (ret != CS_SUCCESS) {
+       if (ret != 0) {
                cs_error(link, RequestIRQ, ret);
                goto exit3;
        }
 
-       /* Look up current Vcc */
-
-       ret = pcmcia_get_configuration_info(link, &conf);
-
-       if (ret != CS_SUCCESS) {
-               cs_error(link, GetConfigurationInfo, ret);
-               goto exit4;
-       }
-
        printk(KERN_INFO IPWIRELESS_PCCARD_NAME ": Card type %s\n",
                        ipw->is_v2_card ? "V2/V3" : "V1");
        printk(KERN_INFO IPWIRELESS_PCCARD_NAME
@@ -341,7 +331,7 @@ static int config_ipwireless(struct ipw_dev *ipw)
         */
        ret = pcmcia_request_configuration(link, &link->conf);
 
-       if (ret != CS_SUCCESS) {
+       if (ret != 0) {
                cs_error(link, RequestConfiguration, ret);
                goto exit4;
        }
index c240562..9a626e5 100644 (file)
@@ -601,7 +601,7 @@ static int mgslpc_config(struct pcmcia_device *link)
 
     cfg = &(parse.cftable_entry);
     CS_CHECK(GetTupleData, pcmcia_get_tuple_data(link, &tuple));
-    CS_CHECK(ParseTuple, pcmcia_parse_tuple(link, &tuple, &parse));
+    CS_CHECK(ParseTuple, pcmcia_parse_tuple(&tuple, &parse));
 
     if (cfg->flags & CISTPL_CFTABLE_DEFAULT) dflt = *cfg;
     if (cfg->index == 0)
index 57029fe..a0f7ffb 100644 (file)
@@ -301,7 +301,7 @@ static void scrup(struct vc_data *vc, unsigned int t, unsigned int b, int nr)
        d = (unsigned short *)(vc->vc_origin + vc->vc_size_row * t);
        s = (unsigned short *)(vc->vc_origin + vc->vc_size_row * (t + nr));
        scr_memmovew(d, s, (b - t - nr) * vc->vc_size_row);
-       scr_memsetw(d + (b - t - nr) * vc->vc_cols, vc->vc_scrl_erase_char,
+       scr_memsetw(d + (b - t - nr) * vc->vc_cols, vc->vc_video_erase_char,
                    vc->vc_size_row * nr);
 }
 
@@ -319,7 +319,7 @@ static void scrdown(struct vc_data *vc, unsigned int t, unsigned int b, int nr)
        s = (unsigned short *)(vc->vc_origin + vc->vc_size_row * t);
        step = vc->vc_cols * nr;
        scr_memmovew(s + step, s, (b - t - nr) * vc->vc_size_row);
-       scr_memsetw(s, vc->vc_scrl_erase_char, 2 * step);
+       scr_memsetw(s, vc->vc_video_erase_char, 2 * step);
 }
 
 static void do_update_region(struct vc_data *vc, unsigned long start, int count)
@@ -434,7 +434,6 @@ static void update_attr(struct vc_data *vc)
                      vc->vc_blink, vc->vc_underline,
                      vc->vc_reverse ^ vc->vc_decscnm, vc->vc_italic);
        vc->vc_video_erase_char = (build_attr(vc, vc->vc_color, 1, vc->vc_blink, 0, vc->vc_decscnm, 0) << 8) | ' ';
-       vc->vc_scrl_erase_char = (build_attr(vc, vc->vc_def_color, 1, false, false, vc->vc_decscnm, false) << 8) | ' ';
 }
 
 /* Note: inverting the screen twice should revert to the original state */
index b50b5da..6c6dd2f 100644 (file)
@@ -54,38 +54,6 @@ menuconfig IDE
 
 if IDE
 
-config BLK_DEV_IDE
-       tristate "Enhanced IDE/MFM/RLL disk/cdrom/tape/floppy support"
-       ---help---
-         If you say Y here, you will use the full-featured IDE driver to
-         control up to ten ATA/IDE interfaces, each being able to serve a
-         "master" and a "slave" device, for a total of up to twenty ATA/IDE
-         disk/cdrom/tape/floppy drives.
-
-         Useful information about large (>540 MB) IDE disks, multiple
-         interfaces, what to do if ATA/IDE devices are not automatically
-         detected, sound card ATA/IDE ports, module support, and other
-         topics, is contained in <file:Documentation/ide/ide.txt>. For detailed
-         information about hard drives, consult the Disk-HOWTO and the
-         Multi-Disk-HOWTO, available from
-         <http://www.tldp.org/docs.html#howto>.
-
-         To fine-tune ATA/IDE drive/interface parameters for improved
-         performance, look for the hdparm package at
-         <ftp://ibiblio.org/pub/Linux/system/hardware/>.
-
-         To compile this driver as a module, choose M here and read
-         <file:Documentation/ide/ide.txt>. The module will be called ide-mod.
-         Do not compile this driver as a module if your root file system (the
-         one containing the directory /) is located on an IDE device.
-
-         If you have one or more IDE drives, say Y or M here. If your system
-         has no IDE drives, or if memory requirements are really tight, you
-         could say N here, and select the "Old hard disk driver" below
-         instead to save about 13 KB of memory in the kernel.
-
-if BLK_DEV_IDE
-
 comment "Please see Documentation/ide/ide.txt for help/info on IDE drives"
 
 config IDE_TIMINGS
@@ -348,7 +316,7 @@ config BLK_DEV_IDEPCI
 
 config IDEPCI_PCIBUS_ORDER
        bool "Probe IDE PCI devices in the PCI bus order (DEPRECATED)"
-       depends on BLK_DEV_IDE=y && BLK_DEV_IDEPCI
+       depends on IDE=y && BLK_DEV_IDEPCI
        default y
        help
          Probe IDE PCI devices in the order in which they appear on the
@@ -729,7 +697,7 @@ endif
 
 config BLK_DEV_IDE_PMAC
        tristate "PowerMac on-board IDE support"
-       depends on PPC_PMAC && IDE=y && BLK_DEV_IDE=y
+       depends on PPC_PMAC && IDE=y
        select IDE_TIMINGS
        help
          This driver provides support for the on-board IDE controller on
@@ -963,6 +931,4 @@ config BLK_DEV_IDEDMA
        def_bool BLK_DEV_IDEDMA_SFF || BLK_DEV_IDEDMA_PMAC || \
                 BLK_DEV_IDEDMA_ICS || BLK_DEV_IDE_AU1XXX_MDMA2_DBDMA
 
-endif
-
 endif # IDE
index 308b8a1..ceaf779 100644 (file)
@@ -5,24 +5,25 @@
 EXTRA_CFLAGS                           += -Idrivers/ide
 
 ide-core-y += ide.o ide-ioctls.o ide-io.o ide-iops.o ide-lib.o ide-probe.o \
-             ide-taskfile.o ide-pio-blacklist.o
+             ide-taskfile.o ide-park.o ide-pio-blacklist.o
 
 # core IDE code
 ide-core-$(CONFIG_IDE_TIMINGS)         += ide-timings.o
 ide-core-$(CONFIG_IDE_ATAPI)           += ide-atapi.o
 ide-core-$(CONFIG_BLK_DEV_IDEPCI)      += setup-pci.o
 ide-core-$(CONFIG_BLK_DEV_IDEDMA)      += ide-dma.o
+ide-core-$(CONFIG_BLK_DEV_IDEDMA_SFF)  += ide-dma-sff.o
 ide-core-$(CONFIG_IDE_PROC_FS)         += ide-proc.o
 ide-core-$(CONFIG_BLK_DEV_IDEACPI)     += ide-acpi.o
 
-obj-$(CONFIG_BLK_DEV_IDE)              += ide-core.o
+obj-$(CONFIG_IDE)                      += ide-core.o
 
 ifeq ($(CONFIG_IDE_ARM), y)
        ide-arm-core-y += arm/ide_arm.o
        obj-y += ide-arm-core.o
 endif
 
-obj-$(CONFIG_BLK_DEV_IDE)              += legacy/ pci/
+obj-$(CONFIG_IDE)                      += legacy/ pci/
 
 obj-$(CONFIG_IDEPCI_PCIBUS_ORDER)      += ide-scan-pci.o
 
@@ -31,15 +32,21 @@ ifeq ($(CONFIG_BLK_DEV_CMD640), y)
        obj-y += cmd640-core.o
 endif
 
-obj-$(CONFIG_BLK_DEV_IDE)              += ppc/
+obj-$(CONFIG_IDE)                      += ppc/
 obj-$(CONFIG_IDE_H8300)                        += h8300/
 obj-$(CONFIG_IDE_GENERIC)              += ide-generic.o
 obj-$(CONFIG_BLK_DEV_IDEPNP)           += ide-pnp.o
 
+ide-disk_mod-y += ide-disk.o ide-disk_ioctl.o
 ide-cd_mod-y += ide-cd.o ide-cd_ioctl.o ide-cd_verbose.o
 ide-floppy_mod-y += ide-floppy.o ide-floppy_ioctl.o
 
-obj-$(CONFIG_BLK_DEV_IDEDISK)          += ide-disk.o
+ifeq ($(CONFIG_IDE_PROC_FS), y)
+       ide-disk_mod-y += ide-disk_proc.o
+       ide-floppy_mod-y += ide-floppy_proc.o
+endif
+
+obj-$(CONFIG_BLK_DEV_IDEDISK)          += ide-disk_mod.o
 obj-$(CONFIG_BLK_DEV_IDECD)            += ide-cd_mod.o
 obj-$(CONFIG_BLK_DEV_IDEFLOPPY)                += ide-floppy_mod.o
 obj-$(CONFIG_BLK_DEV_IDETAPE)          += ide-tape.o
@@ -54,4 +61,4 @@ ifeq ($(CONFIG_BLK_DEV_PLATFORM), y)
        obj-y += ide-platform-core.o
 endif
 
-obj-$(CONFIG_BLK_DEV_IDE)              += arm/ mips/
+obj-$(CONFIG_IDE)                      += arm/ mips/
index 70f5b16..76bdc9a 100644 (file)
@@ -372,25 +372,6 @@ static int icside_dma_test_irq(ide_drive_t *drive)
                        ICS_ARCIN_V6_INTRSTAT_1)) & 1;
 }
 
-static void icside_dma_timeout(ide_drive_t *drive)
-{
-       ide_hwif_t *hwif = drive->hwif;
-
-       printk(KERN_ERR "%s: DMA timeout occurred: ", drive->name);
-
-       if (icside_dma_test_irq(drive))
-               return;
-
-       ide_dump_status(drive, "DMA timeout", hwif->tp_ops->read_status(hwif));
-
-       icside_dma_end(drive);
-}
-
-static void icside_dma_lost_irq(ide_drive_t *drive)
-{
-       printk(KERN_ERR "%s: IRQ lost\n", drive->name);
-}
-
 static int icside_dma_init(ide_hwif_t *hwif, const struct ide_port_info *d)
 {
        hwif->dmatable_cpu      = NULL;
@@ -406,8 +387,8 @@ static const struct ide_dma_ops icside_v6_dma_ops = {
        .dma_start              = icside_dma_start,
        .dma_end                = icside_dma_end,
        .dma_test_irq           = icside_dma_test_irq,
-       .dma_timeout            = icside_dma_timeout,
-       .dma_lost_irq           = icside_dma_lost_irq,
+       .dma_timeout            = ide_dma_timeout,
+       .dma_lost_irq           = ide_dma_lost_irq,
 };
 #else
 #define icside_v6_dma_ops NULL
index bde7a58..e2cdd2e 100644 (file)
@@ -80,7 +80,7 @@ static void h8300_tf_load(ide_drive_t *drive, ide_task_t *task)
                outb(tf->lbah, io_ports->lbah_addr);
 
        if (task->tf_flags & IDE_TFLAG_OUT_DEVICE)
-               outb((tf->device & HIHI) | drive->select.all,
+               outb((tf->device & HIHI) | drive->select,
                     io_ports->device_addr);
 }
 
index 2427c38..244a8a0 100644 (file)
@@ -290,7 +290,7 @@ static int do_drive_get_GTF(ide_drive_t *drive,
        DEBPRINT("ENTER: %s at %s, port#: %d, hard_port#: %d\n",
                 hwif->name, dev->bus_id, port, hwif->channel);
 
-       if (!drive->present) {
+       if ((drive->dev_flags & IDE_DFLAG_PRESENT) == 0) {
                DEBPRINT("%s drive %d:%d not present\n",
                         hwif->name, hwif->channel, port);
                goto out;
@@ -420,8 +420,9 @@ static int do_drive_set_taskfiles(ide_drive_t *drive,
 
        DEBPRINT("ENTER: %s, hard_port#: %d\n", drive->name, drive->dn);
 
-       if (!drive->present)
+       if ((drive->dev_flags & IDE_DFLAG_PRESENT) == 0)
                goto out;
+
        if (!gtf_count)         /* shouldn't be here */
                goto out;
 
@@ -660,7 +661,8 @@ void ide_acpi_set_state(ide_hwif_t *hwif, int on)
                if (!drive->acpidata->obj_handle)
                        drive->acpidata->obj_handle = ide_acpi_drive_get_handle(drive);
 
-               if (drive->acpidata->obj_handle && drive->present) {
+               if (drive->acpidata->obj_handle &&
+                   (drive->dev_flags & IDE_DFLAG_PRESENT)) {
                        acpi_bus_set_power(drive->acpidata->obj_handle,
                                on? ACPI_STATE_D0: ACPI_STATE_D3);
                }
@@ -720,7 +722,7 @@ void ide_acpi_port_init_devices(ide_hwif_t *hwif)
 
                memset(drive->acpidata, 0, sizeof(*drive->acpidata));
 
-               if (!drive->present)
+               if ((drive->dev_flags & IDE_DFLAG_PRESENT) == 0)
                        continue;
 
                err = taskfile_lib_get_identify(drive, drive->acpidata->idbuff);
@@ -745,7 +747,7 @@ void ide_acpi_port_init_devices(ide_hwif_t *hwif)
        for (i = 0; i < MAX_DRIVES; i++) {
                drive = &hwif->drives[i];
 
-               if (drive->present)
+               if (drive->dev_flags & IDE_DFLAG_PRESENT)
                        /* Execute ACPI startup code */
                        ide_acpi_exec_tfs(drive);
        }
index 608c5ba..2e30571 100644 (file)
@@ -124,8 +124,8 @@ EXPORT_SYMBOL_GPL(ide_init_pc);
  * the current request, so that it will be processed immediately, on the next
  * pass through the driver.
  */
-void ide_queue_pc_head(ide_drive_t *drive, struct gendisk *disk,
-                      struct ide_atapi_pc *pc, struct request *rq)
+static void ide_queue_pc_head(ide_drive_t *drive, struct gendisk *disk,
+                             struct ide_atapi_pc *pc, struct request *rq)
 {
        blk_rq_init(NULL, rq);
        rq->cmd_type = REQ_TYPE_SPECIAL;
@@ -137,7 +137,6 @@ void ide_queue_pc_head(ide_drive_t *drive, struct gendisk *disk,
                rq->cmd[13] = REQ_IDETAPE_PC1;
        ide_do_drive_cmd(drive, rq);
 }
-EXPORT_SYMBOL_GPL(ide_queue_pc_head);
 
 /*
  * Add a special packet command request to the tail of the request queue,
@@ -203,25 +202,80 @@ int ide_set_media_lock(ide_drive_t *drive, struct gendisk *disk, int on)
 }
 EXPORT_SYMBOL_GPL(ide_set_media_lock);
 
-/* TODO: unify the code thus making some arguments go away */
-ide_startstop_t ide_pc_intr(ide_drive_t *drive, struct ide_atapi_pc *pc,
-       ide_handler_t *handler, unsigned int timeout, ide_expiry_t *expiry,
-       void (*update_buffers)(ide_drive_t *, struct ide_atapi_pc *),
-       void (*retry_pc)(ide_drive_t *), void (*dsc_handle)(ide_drive_t *),
-       int (*io_buffers)(ide_drive_t *, struct ide_atapi_pc *, unsigned, int))
+void ide_create_request_sense_cmd(ide_drive_t *drive, struct ide_atapi_pc *pc)
 {
+       ide_init_pc(pc);
+       pc->c[0] = REQUEST_SENSE;
+       if (drive->media == ide_floppy) {
+               pc->c[4] = 255;
+               pc->req_xfer = 18;
+       } else {
+               pc->c[4] = 20;
+               pc->req_xfer = 20;
+       }
+}
+EXPORT_SYMBOL_GPL(ide_create_request_sense_cmd);
+
+/*
+ * Called when an error was detected during the last packet command.
+ * We queue a request sense packet command in the head of the request list.
+ */
+void ide_retry_pc(ide_drive_t *drive, struct gendisk *disk)
+{
+       struct request *rq = &drive->request_sense_rq;
+       struct ide_atapi_pc *pc = &drive->request_sense_pc;
+
+       (void)ide_read_error(drive);
+       ide_create_request_sense_cmd(drive, pc);
+       if (drive->media == ide_tape)
+               set_bit(IDE_AFLAG_IGNORE_DSC, &drive->atapi_flags);
+       ide_queue_pc_head(drive, disk, pc, rq);
+}
+EXPORT_SYMBOL_GPL(ide_retry_pc);
+
+int ide_scsi_expiry(ide_drive_t *drive)
+{
+       struct ide_atapi_pc *pc = drive->pc;
+
+       debug_log("%s called for %lu at %lu\n", __func__,
+                 pc->scsi_cmd->serial_number, jiffies);
+
+       pc->flags |= PC_FLAG_TIMEDOUT;
+
+       return 0; /* we do not want the IDE subsystem to retry */
+}
+EXPORT_SYMBOL_GPL(ide_scsi_expiry);
+
+/*
+ * This is the usual interrupt handler which will be called during a packet
+ * command.  We will transfer some of the data (as requested by the drive)
+ * and will re-point interrupt handler to us.
+ */
+static ide_startstop_t ide_pc_intr(ide_drive_t *drive)
+{
+       struct ide_atapi_pc *pc = drive->pc;
        ide_hwif_t *hwif = drive->hwif;
        struct request *rq = hwif->hwgroup->rq;
        const struct ide_tp_ops *tp_ops = hwif->tp_ops;
        xfer_func_t *xferfunc;
-       unsigned int temp;
+       ide_expiry_t *expiry;
+       unsigned int timeout, temp;
        u16 bcount;
-       u8 stat, ireason, scsi = drive->scsi;
+       u8 stat, ireason, scsi = !!(drive->dev_flags & IDE_DFLAG_SCSI), dsc = 0;
 
        debug_log("Enter %s - interrupt handler\n", __func__);
 
+       if (scsi) {
+               timeout = ide_scsi_get_timeout(pc);
+               expiry = ide_scsi_expiry;
+       } else {
+               timeout = (drive->media == ide_floppy) ? WAIT_FLOPPY_CMD
+                                                      : WAIT_TAPE_CMD;
+               expiry = NULL;
+       }
+
        if (pc->flags & PC_FLAG_TIMEDOUT) {
-               drive->pc_callback(drive);
+               drive->pc_callback(drive, 0);
                return ide_stopped;
        }
 
@@ -238,8 +292,8 @@ ide_startstop_t ide_pc_intr(ide_drive_t *drive, struct ide_atapi_pc *pc,
                        pc->flags |= PC_FLAG_DMA_ERROR;
                } else {
                        pc->xferred = pc->req_xfer;
-                       if (update_buffers)
-                               update_buffers(drive, pc);
+                       if (drive->pc_update_buffers)
+                               drive->pc_update_buffers(drive, pc);
                }
                debug_log("%s: DMA finished\n", drive->name);
        }
@@ -276,21 +330,19 @@ ide_startstop_t ide_pc_intr(ide_drive_t *drive, struct ide_atapi_pc *pc,
                        debug_log("[cmd %x]: check condition\n", rq->cmd[0]);
 
                        /* Retry operation */
-                       retry_pc(drive);
+                       ide_retry_pc(drive, rq->rq_disk);
 
                        /* queued, but not started */
                        return ide_stopped;
                }
 cmd_finished:
                pc->error = 0;
-               if ((pc->flags & PC_FLAG_WAIT_FOR_DSC) &&
-                   (stat & ATA_DSC) == 0) {
-                       dsc_handle(drive);
-                       return ide_stopped;
-               }
+
+               if ((pc->flags & PC_FLAG_WAIT_FOR_DSC) && (stat & ATA_DSC) == 0)
+                       dsc = 1;
 
                /* Command finished - Call the callback function */
-               drive->pc_callback(drive);
+               drive->pc_callback(drive, dsc);
 
                return ide_stopped;
        }
@@ -336,7 +388,8 @@ cmd_finished:
                                        temp = 0;
                                if (temp) {
                                        if (pc->sg)
-                                               io_buffers(drive, pc, temp, 0);
+                                               drive->pc_io_buffers(drive, pc,
+                                                                    temp, 0);
                                        else
                                                tp_ops->input_data(drive, NULL,
                                                        pc->cur_pos, temp);
@@ -348,9 +401,7 @@ cmd_finished:
                                pc->xferred += temp;
                                pc->cur_pos += temp;
                                ide_pad_transfer(drive, 0, bcount - temp);
-                               ide_set_handler(drive, handler, timeout,
-                                               expiry);
-                               return ide_started;
+                               goto next_irq;
                        }
                        debug_log("The device wants to send us more data than "
                                  "expected - allowing transfer\n");
@@ -362,7 +413,7 @@ cmd_finished:
        if ((drive->media == ide_floppy && !scsi && !pc->buf) ||
            (drive->media == ide_tape && !scsi && pc->bh) ||
            (scsi && pc->sg)) {
-               int done = io_buffers(drive, pc, bcount,
+               int done = drive->pc_io_buffers(drive, pc, bcount,
                                  !!(pc->flags & PC_FLAG_WRITING));
 
                /* FIXME: don't do partial completions */
@@ -377,12 +428,11 @@ cmd_finished:
 
        debug_log("[cmd %x] transferred %d bytes on that intr.\n",
                  rq->cmd[0], bcount);
-
+next_irq:
        /* And set the interrupt handler again */
-       ide_set_handler(drive, handler, timeout, expiry);
+       ide_set_handler(drive, ide_pc_intr, timeout, expiry);
        return ide_started;
 }
-EXPORT_SYMBOL_GPL(ide_pc_intr);
 
 static u8 ide_read_ireason(ide_drive_t *drive)
 {
@@ -418,12 +468,22 @@ static u8 ide_wait_ireason(ide_drive_t *drive, u8 ireason)
        return ireason;
 }
 
-ide_startstop_t ide_transfer_pc(ide_drive_t *drive, struct ide_atapi_pc *pc,
-                               ide_handler_t *handler, unsigned int timeout,
-                               ide_expiry_t *expiry)
+static int ide_delayed_transfer_pc(ide_drive_t *drive)
 {
+       /* Send the actual packet */
+       drive->hwif->tp_ops->output_data(drive, NULL, drive->pc->c, 12);
+
+       /* Timeout for the packet command */
+       return WAIT_FLOPPY_CMD;
+}
+
+static ide_startstop_t ide_transfer_pc(ide_drive_t *drive)
+{
+       struct ide_atapi_pc *pc = drive->pc;
        ide_hwif_t *hwif = drive->hwif;
        struct request *rq = hwif->hwgroup->rq;
+       ide_expiry_t *expiry;
+       unsigned int timeout;
        ide_startstop_t startstop;
        u8 ireason;
 
@@ -434,7 +494,8 @@ ide_startstop_t ide_transfer_pc(ide_drive_t *drive, struct ide_atapi_pc *pc,
        }
 
        ireason = ide_read_ireason(drive);
-       if (drive->media == ide_tape && !drive->scsi)
+       if (drive->media == ide_tape &&
+           (drive->dev_flags & IDE_DFLAG_SCSI) == 0)
                ireason = ide_wait_ireason(drive, ireason);
 
        if ((ireason & ATAPI_COD) == 0 || (ireason & ATAPI_IO)) {
@@ -443,8 +504,27 @@ ide_startstop_t ide_transfer_pc(ide_drive_t *drive, struct ide_atapi_pc *pc,
                return ide_do_reset(drive);
        }
 
+       /*
+        * If necessary schedule the packet transfer to occur 'timeout'
+        * miliseconds later in ide_delayed_transfer_pc() after the device
+        * says it's ready for a packet.
+        */
+       if (drive->atapi_flags & IDE_AFLAG_ZIP_DRIVE) {
+               timeout = drive->pc_delay;
+               expiry = &ide_delayed_transfer_pc;
+       } else {
+               if (drive->dev_flags & IDE_DFLAG_SCSI) {
+                       timeout = ide_scsi_get_timeout(pc);
+                       expiry = ide_scsi_expiry;
+               } else {
+                       timeout = (drive->media == ide_floppy) ? WAIT_FLOPPY_CMD
+                                                              : WAIT_TAPE_CMD;
+                       expiry = NULL;
+               }
+       }
+
        /* Set the interrupt routine */
-       ide_set_handler(drive, handler, timeout, expiry);
+       ide_set_handler(drive, ide_pc_intr, timeout, expiry);
 
        /* Begin DMA, if necessary */
        if (pc->flags & PC_FLAG_DMA_OK) {
@@ -458,22 +538,22 @@ ide_startstop_t ide_transfer_pc(ide_drive_t *drive, struct ide_atapi_pc *pc,
 
        return ide_started;
 }
-EXPORT_SYMBOL_GPL(ide_transfer_pc);
 
-ide_startstop_t ide_issue_pc(ide_drive_t *drive, struct ide_atapi_pc *pc,
-                            ide_handler_t *handler, unsigned int timeout,
+ide_startstop_t ide_issue_pc(ide_drive_t *drive, unsigned int timeout,
                             ide_expiry_t *expiry)
 {
+       struct ide_atapi_pc *pc = drive->pc;
        ide_hwif_t *hwif = drive->hwif;
+       u32 tf_flags;
        u16 bcount;
-       u8 dma = 0;
+       u8 scsi = !!(drive->dev_flags & IDE_DFLAG_SCSI);
 
        /* We haven't transferred any data yet */
        pc->xferred = 0;
        pc->cur_pos = pc->buf;
 
        /* Request to transfer the entire buffer at once */
-       if (drive->media == ide_tape && !drive->scsi)
+       if (drive->media == ide_tape && scsi == 0)
                bcount = pc->req_xfer;
        else
                bcount = min(pc->req_xfer, 63 * 1024);
@@ -483,28 +563,35 @@ ide_startstop_t ide_issue_pc(ide_drive_t *drive, struct ide_atapi_pc *pc,
                ide_dma_off(drive);
        }
 
-       if ((pc->flags & PC_FLAG_DMA_OK) && drive->using_dma) {
-               if (drive->scsi)
+       if ((pc->flags & PC_FLAG_DMA_OK) &&
+           (drive->dev_flags & IDE_DFLAG_USING_DMA)) {
+               if (scsi)
                        hwif->sg_mapped = 1;
-               dma = !hwif->dma_ops->dma_setup(drive);
-               if (drive->scsi)
+               drive->dma = !hwif->dma_ops->dma_setup(drive);
+               if (scsi)
                        hwif->sg_mapped = 0;
        }
 
-       if (!dma)
+       if (!drive->dma)
                pc->flags &= ~PC_FLAG_DMA_OK;
 
-       ide_pktcmd_tf_load(drive, drive->scsi ? 0 : IDE_TFLAG_OUT_DEVICE,
-                          bcount, dma);
+       if (scsi)
+               tf_flags = 0;
+       else if (drive->media == ide_cdrom || drive->media == ide_optical)
+               tf_flags = IDE_TFLAG_OUT_NSECT | IDE_TFLAG_OUT_LBAL;
+       else
+               tf_flags = IDE_TFLAG_OUT_DEVICE;
+
+       ide_pktcmd_tf_load(drive, tf_flags, bcount, drive->dma);
 
        /* Issue the packet command */
        if (drive->atapi_flags & IDE_AFLAG_DRQ_INTERRUPT) {
-               ide_execute_command(drive, ATA_CMD_PACKET, handler,
+               ide_execute_command(drive, ATA_CMD_PACKET, ide_transfer_pc,
                                    timeout, NULL);
                return ide_started;
        } else {
                ide_execute_pkt_cmd(drive);
-               return (*handler)(drive);
+               return ide_transfer_pc(drive);
        }
 }
 EXPORT_SYMBOL_GPL(ide_issue_pc);
index 465a92c..3308b1c 100644 (file)
@@ -23,6 +23,9 @@
  *     Documentation/ide/ChangeLog.ide-cd.1994-2004
  */
 
+#define DRV_NAME "ide-cd"
+#define PFX DRV_NAME ": "
+
 #define IDECD_VERSION "5.00"
 
 #include <linux/module.h>
 
 #include "ide-cd.h"
 
-static DEFINE_MUTEX(idecd_ref_mutex);
+#define IDECD_DEBUG_LOG                1
 
-#define to_ide_cd(obj) container_of(obj, struct cdrom_info, kref)
+#if IDECD_DEBUG_LOG
+#define ide_debug_log(lvl, fmt, args...) __ide_debug_log(lvl, fmt, args)
+#else
+#define ide_debug_log(lvl, fmt, args...) do {} while (0)
+#endif
 
-#define ide_cd_g(disk) \
-       container_of((disk)->private_data, struct cdrom_info, driver)
+static DEFINE_MUTEX(idecd_ref_mutex);
 
 static void ide_cd_release(struct kref *);
 
@@ -64,7 +70,7 @@ static struct cdrom_info *ide_cd_get(struct gendisk *disk)
        struct cdrom_info *cd = NULL;
 
        mutex_lock(&idecd_ref_mutex);
-       cd = ide_cd_g(disk);
+       cd = ide_drv_g(disk, cdrom_info);
        if (cd) {
                if (ide_device_get(cd->drive))
                        cd = NULL;
@@ -102,6 +108,9 @@ static int cdrom_log_sense(ide_drive_t *drive, struct request *rq,
 {
        int log = 0;
 
+       ide_debug_log(IDE_DBG_SENSE, "Call %s, sense_key: 0x%x\n", __func__,
+                     sense->sense_key);
+
        if (!sense || !rq || (rq->cmd_flags & REQ_QUIET))
                return 0;
 
@@ -150,6 +159,14 @@ static void cdrom_analyze_sense_data(ide_drive_t *drive,
        unsigned long bio_sectors;
        struct cdrom_info *info = drive->driver_data;
 
+       ide_debug_log(IDE_DBG_SENSE, "Call %s, error_code: 0x%x, "
+                       "sense_key: 0x%x\n", __func__, sense->error_code,
+                       sense->sense_key);
+
+       if (failed_command)
+               ide_debug_log(IDE_DBG_SENSE, "%s: failed cmd: 0x%x\n",
+                               __func__, failed_command->cmd[0]);
+
        if (!cdrom_log_sense(drive, failed_command, sense))
                return;
 
@@ -200,6 +217,8 @@ static void cdrom_queue_request_sense(ide_drive_t *drive, void *sense,
        struct cdrom_info *info         = drive->driver_data;
        struct request *rq              = &info->request_sense_request;
 
+       ide_debug_log(IDE_DBG_SENSE, "Call %s\n", __func__);
+
        if (sense == NULL)
                sense = &info->sense_data;
 
@@ -219,6 +238,10 @@ static void cdrom_queue_request_sense(ide_drive_t *drive, void *sense,
        /* NOTE! Save the failed command in "rq->buffer" */
        rq->buffer = (void *) failed_command;
 
+       if (failed_command)
+               ide_debug_log(IDE_DBG_SENSE, "failed_cmd: 0x%x\n",
+                             failed_command->cmd[0]);
+
        ide_do_drive_cmd(drive, rq);
 }
 
@@ -227,6 +250,10 @@ static void cdrom_end_request(ide_drive_t *drive, int uptodate)
        struct request *rq = HWGROUP(drive)->rq;
        int nsectors = rq->hard_cur_sectors;
 
+       ide_debug_log(IDE_DBG_FUNC, "Call %s, cmd: 0x%x, uptodate: 0x%x, "
+                     "nsectors: %d\n", __func__, rq->cmd[0], uptodate,
+                     nsectors);
+
        if (blk_sense_request(rq) && uptodate) {
                /*
                 * For REQ_TYPE_SENSE, "rq->buffer" points to the original
@@ -269,6 +296,9 @@ static void cdrom_end_request(ide_drive_t *drive, int uptodate)
        if (!nsectors)
                nsectors = 1;
 
+       ide_debug_log(IDE_DBG_FUNC, "Exit %s, uptodate: 0x%x, nsectors: %d\n",
+                     __func__, uptodate, nsectors);
+
        ide_end_request(drive, uptodate, nsectors);
 }
 
@@ -304,11 +334,15 @@ static int cdrom_decode_status(ide_drive_t *drive, int good_stat, int *stat_ret)
        sense_key = err >> 4;
 
        if (rq == NULL) {
-               printk(KERN_ERR "%s: missing rq in %s\n",
+               printk(KERN_ERR PFX "%s: missing rq in %s\n",
                                drive->name, __func__);
                return 1;
        }
 
+       ide_debug_log(IDE_DBG_RQ, "%s: stat: 0x%x, good_stat: 0x%x, "
+                     "rq->cmd_type: 0x%x, err: 0x%x\n", __func__, stat,
+                     good_stat, rq->cmd_type, err);
+
        if (blk_sense_request(rq)) {
                /*
                 * We got an error trying to get sense info from the drive
@@ -374,7 +408,8 @@ static int cdrom_decode_status(ide_drive_t *drive, int good_stat, int *stat_ret)
                                cdrom_saw_media_change(drive);
 
                                /* fail the request */
-                               printk(KERN_ERR "%s: tray open\n", drive->name);
+                               printk(KERN_ERR PFX "%s: tray open\n",
+                                               drive->name);
                                do_end_request = 1;
                        } else {
                                struct cdrom_info *info = drive->driver_data;
@@ -460,7 +495,7 @@ static int cdrom_decode_status(ide_drive_t *drive, int good_stat, int *stat_ret)
                if (stat & ATA_ERR)
                        cdrom_queue_request_sense(drive, NULL, NULL);
        } else {
-               blk_dump_rq_flags(rq, "ide-cd: bad rq");
+               blk_dump_rq_flags(rq, PFX "bad rq");
                cdrom_end_request(drive, 0);
        }
 
@@ -488,6 +523,9 @@ static int cdrom_timer_expiry(ide_drive_t *drive)
        struct request *rq = HWGROUP(drive)->rq;
        unsigned long wait = 0;
 
+       ide_debug_log(IDE_DBG_RQ, "Call %s: rq->cmd[0]: 0x%x\n", __func__,
+                     rq->cmd[0]);
+
        /*
         * Some commands are *slow* and normally take a long time to complete.
         * Usually we can use the ATAPI "disconnect" to bypass this, but not all
@@ -504,7 +542,7 @@ static int cdrom_timer_expiry(ide_drive_t *drive)
                break;
        default:
                if (!(rq->cmd_flags & REQ_QUIET))
-                       printk(KERN_INFO "ide-cd: cmd 0x%x timed out\n",
+                       printk(KERN_INFO PFX "cmd 0x%x timed out\n",
                                         rq->cmd[0]);
                wait = 0;
                break;
@@ -524,20 +562,21 @@ static ide_startstop_t cdrom_start_packet_command(ide_drive_t *drive,
                                                  int xferlen,
                                                  ide_handler_t *handler)
 {
-       struct cdrom_info *info = drive->driver_data;
        ide_hwif_t *hwif = drive->hwif;
 
+       ide_debug_log(IDE_DBG_PC, "Call %s, xferlen: %d\n", __func__, xferlen);
+
        /* FIXME: for Virtual DMA we must check harder */
-       if (info->dma)
-               info->dma = !hwif->dma_ops->dma_setup(drive);
+       if (drive->dma)
+               drive->dma = !hwif->dma_ops->dma_setup(drive);
 
        /* set up the controller registers */
        ide_pktcmd_tf_load(drive, IDE_TFLAG_OUT_NSECT | IDE_TFLAG_OUT_LBAL,
-                          xferlen, info->dma);
+                          xferlen, drive->dma);
 
        if (drive->atapi_flags & IDE_AFLAG_DRQ_INTERRUPT) {
                /* waiting for CDB interrupt, not DMA yet. */
-               if (info->dma)
+               if (drive->dma)
                        drive->waiting_for_dma = 0;
 
                /* packet command */
@@ -564,9 +603,10 @@ static ide_startstop_t cdrom_transfer_packet_command(ide_drive_t *drive,
 {
        ide_hwif_t *hwif = drive->hwif;
        int cmd_len;
-       struct cdrom_info *info = drive->driver_data;
        ide_startstop_t startstop;
 
+       ide_debug_log(IDE_DBG_PC, "Call %s\n", __func__);
+
        if (drive->atapi_flags & IDE_AFLAG_DRQ_INTERRUPT) {
                /*
                 * Here we should have been called after receiving an interrupt
@@ -578,7 +618,7 @@ static ide_startstop_t cdrom_transfer_packet_command(ide_drive_t *drive,
                        return ide_stopped;
 
                /* ok, next interrupt will be DMA interrupt */
-               if (info->dma)
+               if (drive->dma)
                        drive->waiting_for_dma = 1;
        } else {
                /* otherwise, we must wait for DRQ to get set */
@@ -599,7 +639,7 @@ static ide_startstop_t cdrom_transfer_packet_command(ide_drive_t *drive,
        hwif->tp_ops->output_data(drive, NULL, rq->cmd, cmd_len);
 
        /* start the DMA if need be */
-       if (info->dma)
+       if (drive->dma)
                hwif->dma_ops->dma_start(drive);
 
        return ide_started;
@@ -615,6 +655,9 @@ static int ide_cd_check_ireason(ide_drive_t *drive, struct request *rq,
 {
        ide_hwif_t *hwif = drive->hwif;
 
+       ide_debug_log(IDE_DBG_FUNC, "Call %s, ireason: 0x%x, rw: 0x%x\n",
+                     __func__, ireason, rw);
+
        /*
         * ireason == 0: the drive&nbs