firefly-linux-kernel-4.4.55.git
16 years agoide: add IDE_HFLAG_CLEAR_SIMPLEX host flag
Bartlomiej Zolnierkiewicz [Fri, 1 Feb 2008 22:09:30 +0000 (23:09 +0100)]
ide: add IDE_HFLAG_CLEAR_SIMPLEX host flag

* Rename 'simplex_stat' variable to 'dma_stat' in ide_get_or_set_dma_base().

* Factor out code for forcing host out of "simplex" mode from
  ide_get_or_set_dma_base() to ide_pci_clear_simplex() helper.

* Add IDE_HFLAG_CLEAR_SIMPLEX host flag and set it in alim15x3 (for M5229),
  amd74xx (for AMD 7409), cmd64x (for CMD643), generic (for Netcell) and
  serverworks (for CSB5) host drivers.

* Make ide_get_or_set_dma_base() test for IDE_HFLAG_CLEAR_SIMPLEX host flag
  instead of checking dev->device (BTW the code was buggy because it didn't
  check for dev->vendor, luckily none of these PCI Device IDs was used by
  some other vendor for PCI IDE controller).

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoamd74xx: remove amd_ide_chips table
Bartlomiej Zolnierkiewicz [Fri, 1 Feb 2008 22:09:30 +0000 (23:09 +0100)]
amd74xx: remove amd_ide_chips table

* Remove no longer needed assertion from amd74xx_probe().

* Factor out cable detection for AMD7409 to amd7409_cable_detect() and for
  chipsets >= AMD7411 to amd7411_cable_detect().

* Use dev->vendor and dev->device instead of amd_config->udma_mask when
  selecting cable detection method and checking for broken FIFO support in
  init_chipset_amd74xx().

* Remove no longer needed AMD_BAD_FIFO define.

* Add 'swdma' parameter for setting .swdma_mask to DECLARE_AMD_DEV() macro.

* Add 'udma' parameter for setting .udma_mask to DECLARE_{AMD,NV}_DEV() macro.

* Keep a copy of a current amd74xx_chipsets[] entry in amd74xx_probe()
  in order to fix ->swdma_mask on early AMD7409 revisions and ->udma_mask
  on Serenade mainboards.

* Remove no longer needed fixups from init_chipset_amd74xx()
  and AMD_CHECK_{SWDMA,SERENADE} defines.

* Move printing banner message from init_chipset_amd74xx() to amd74xx_probe(),
  also remove incorrect comment while at it.

* Use hwif->ultra_mask instead of amd_config->udma_mask in amd_set_drive().

* Add 'udma_mask' argument to amd_set_speed() and pass UDMA mask from
  amd_set_drive() instead of using amd_config->udma_mask.

* Move amd_config->base from AMD_* defines to users of these defines and add
  0x40 the defined values.  Then add amd_offset() inline helper for selecting
  offset from 0x40 base (needed for nVidia controllers) and finally use it in
  amd_set_speed(), amd7411_cable_detect() and init_chipset_amd74xx() instead
  of amd_config->base.

* Remove no longer needed AMD_BAD_SWDMA define, ->{swdma,ultra}_mask setup
  from init_hwif_amd74xx(), amd_{config,chipset} variables and amd_ide_chips
  table.

* Fix init_chipset_amd74xx() comment.

* Bump driver version.

There should be no functionality changes caused by this patch.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: ide_setup_dma() assumes 8 ports
Sergei Shtylyov [Fri, 1 Feb 2008 22:09:30 +0000 (23:09 +0100)]
ide: ide_setup_dma() assumes 8 ports

According to http://marc.info/?l=linux-ide&m=114346138611631, the drivers must
always register 8 DMA ports with ide_setup_dma(), so its last argument is not
needed. While at it, kill some useless parens in that function...

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agotrm290: cannot call ide_setup_dma()
Sergei Shtylyov [Fri, 1 Feb 2008 22:09:29 +0000 (23:09 +0100)]
trm290: cannot call ide_setup_dma()

The TRM-290 chip is *not* SFF-8038i compatible and therefore can *not* call
ide_setup_dma() -- fix this and also cleanup the code a bit...

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-cd: move the remaining cdrom.c ioctl handling code to ide-cd_ioctl.c
Borislav Petkov [Fri, 1 Feb 2008 22:09:29 +0000 (23:09 +0100)]
ide-cd: move the remaining cdrom.c ioctl handling code to ide-cd_ioctl.c

There should be no functional changes from this.

Signed-off-by: Borislav Petkov <bbpetkov@yahoo.de>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-{floppy,tape}: remove debug code for dumping identify data
Bartlomiej Zolnierkiewicz [Fri, 1 Feb 2008 22:09:29 +0000 (23:09 +0100)]
ide-{floppy,tape}: remove debug code for dumping identify data

IDE core supports dumping raw identify data in hdparm friendly format now
so verbose identify dumping in ide-{floppy,tape}.c device drivers (done iff
IDE{FLOPPY,TAPE}_DEBUG_INFO is defined to '1' and it is '0' by default)
is no longer nedeed.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: add ide_dump_identify() debug helper
Bartlomiej Zolnierkiewicz [Fri, 1 Feb 2008 22:09:28 +0000 (23:09 +0100)]
ide: add ide_dump_identify() debug helper

* Add ide_dump_identify() debug helper for dumping raw identify data in
  the hdparm friendly format (== the identify data can be extracted from
  dmesg output and passed to hdparm --Istdin).

* Dump identify data in ide-probe.c::do_identify() if DEBUG is enabled.

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-cd: update driver version, comments and copyrights
Bartlomiej Zolnierkiewicz [Fri, 1 Feb 2008 22:09:28 +0000 (23:09 +0100)]
ide-cd: update driver version, comments and copyrights

* Bump driver version.

* Remove filename and stale TODO from comments.

* Add my copyrights.

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-cd: unify request end exit path in cdrom_decode_status()
Bartlomiej Zolnierkiewicz [Fri, 1 Feb 2008 22:09:28 +0000 (23:09 +0100)]
ide-cd: unify request end exit path in cdrom_decode_status()

There should be no functionality changes caused by this patch.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-cd: merge cdrom_write_check_ireason() and cdrom_read_check_ireason()
Bartlomiej Zolnierkiewicz [Fri, 1 Feb 2008 22:09:28 +0000 (23:09 +0100)]
ide-cd: merge cdrom_write_check_ireason() and cdrom_read_check_ireason()

Add 'rw' parameter to cdrom_read_check_ireason(), make it handle
both read and write checking, rename it to ide_cd_check_ireason(),
finally remove no longer needed cdrom_write_check_ireason().

There should be no functionality changes caused by this patch.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-cd: merge cdrom_rw_intr() and cdrom_newpc_intr()
Bartlomiej Zolnierkiewicz [Fri, 1 Feb 2008 22:09:28 +0000 (23:09 +0100)]
ide-cd: merge cdrom_rw_intr() and cdrom_newpc_intr()

Add handling of fs read/write requests to cdrom_nepwc_intr()
and remove no longer needed cdrom_rw_intr().

There should be no functionality changes caused by this patch.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-cd: call blk_dump_rq_flags() on "missing data" in cdrom_rw_intr()
Bartlomiej Zolnierkiewicz [Fri, 1 Feb 2008 22:09:27 +0000 (23:09 +0100)]
ide-cd: call blk_dump_rq_flags() on "missing data" in cdrom_rw_intr()

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-cd: prepare cdrom_rw_intr() and cdrom_newpc_intr() to be merged
Bartlomiej Zolnierkiewicz [Fri, 1 Feb 2008 22:09:27 +0000 (23:09 +0100)]
ide-cd: prepare cdrom_rw_intr() and cdrom_newpc_intr() to be merged

In cdrom_newpc_intr():
* cleanup variables in the 'transfer data' loop

In cdrom_rw_intr():
* rename 'sectors_to_transfer' to 'thislen'
* rename 'this_transfer' to 'blen'
* keep number of bytes (instead of sectors) in 'thislen' and 'blen'
* call 'xferfunc' only once for 'blen'
* cache 'rq->buffer' in 'ptr' variable
* check for 'rq->bio' before setting 'ptr' and 'blen'
* check for 'ptr' instead of 'rq->current_nr_sectors'

There should be no functionality changes caused by this patch.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-cd: unify moving to the next buffer in cdrom_rw_intr()
Bartlomiej Zolnierkiewicz [Fri, 1 Feb 2008 22:09:27 +0000 (23:09 +0100)]
ide-cd: unify moving to the next buffer in cdrom_rw_intr()

Use the fact that for the first loop rq->current_nr_sectors is always
set and unify moving to the next buffer for read/write requests.

There should be no functionality changes caused by this patch.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-cd: merge cdrom_start_read() and cdrom_start_write()
Bartlomiej Zolnierkiewicz [Fri, 1 Feb 2008 22:09:27 +0000 (23:09 +0100)]
ide-cd: merge cdrom_start_read() and cdrom_start_write()

Add handling of read requests to cdrom_start_write(), rename it
to cdrom_start_rw() and remove no longer needed cdrom_start_read().

There should be no functionality changes caused by this patch.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-cd: merge cdrom_start_read_continuation() and cdrom_start_rw_cont()
Bartlomiej Zolnierkiewicz [Fri, 1 Feb 2008 22:09:27 +0000 (23:09 +0100)]
ide-cd: merge cdrom_start_read_continuation() and cdrom_start_rw_cont()

* Add handling of write requests to cdrom_start_read_continuation(),
  rename it to cdrom_start_rw_cont() and remove no longer needed
  cdrom_start_write_cont().

* Remove redundant '(rq->sector & (sectors_per_frame - 1)' check.

There should be no functionality changes caused by this patch.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-cd: merge cdrom_read_intr() and cdrom_write_intr()
Bartlomiej Zolnierkiewicz [Fri, 1 Feb 2008 22:09:26 +0000 (23:09 +0100)]
ide-cd: merge cdrom_read_intr() and cdrom_write_intr()

Add handling of read requests to cdrom_write_intr(), rename it
to cdrom_rw_intr() and remove no longer needed cdrom_read_intr().

There should be no functionality changes caused by this patch.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-cd: factor out transfer size checking from cdrom_read_intr()
Bartlomiej Zolnierkiewicz [Fri, 1 Feb 2008 22:09:26 +0000 (23:09 +0100)]
ide-cd: factor out transfer size checking from cdrom_read_intr()

This is a preparation for cdrom_read_intr() and cdrom_write_intr() merge.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-cd: add ide_cd_drain_data() helper
Bartlomiej Zolnierkiewicz [Fri, 1 Feb 2008 22:09:26 +0000 (23:09 +0100)]
ide-cd: add ide_cd_drain_data() helper

Add ide_cd_drain_data() and use it in cdrom_{buffer_sectors,read_intr}()
(as a nice side-effect this cuts 0.5kB of code from ide-cd.o).

There should be no functionality changes caused by this patch.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-cd: merge cdrom_do_packet_command() and cdrom_do_block_pc()
Bartlomiej Zolnierkiewicz [Fri, 1 Feb 2008 22:09:26 +0000 (23:09 +0100)]
ide-cd: merge cdrom_do_packet_command() and cdrom_do_block_pc()

Add REQ_TYPE_{SENSE,ATA_PC} requests handling to cdrom_do_block_pc()
and remove cdrom_do_packet_command().

There should be no functionality changes caused by this patch.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-cd: remove cdrom_do_pc_continuation()
Bartlomiej Zolnierkiewicz [Fri, 1 Feb 2008 22:09:26 +0000 (23:09 +0100)]
ide-cd: remove cdrom_do_pc_continuation()

cdrom_do_pc_continuation() is now identical to cdrom_do_newpc_cont()
so just always use the latter function.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-cd: merge cdrom_pc_intr() and cdrom_newpc_intr()
Bartlomiej Zolnierkiewicz [Fri, 1 Feb 2008 22:09:25 +0000 (23:09 +0100)]
ide-cd: merge cdrom_pc_intr() and cdrom_newpc_intr()

Add handling of REQ_TYPE_{SENSE,ATA_PC} requests to cdrom_newpc_intr()
(please note that these requests never have 'bio' attached to them
and they never use DMA), then remove no longer needed cdrom_pc_intr().

There should be no functionality changes caused by this patch.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-cd: unify request end exit path in cdrom_pc_intr()
Bartlomiej Zolnierkiewicz [Fri, 1 Feb 2008 22:09:25 +0000 (23:09 +0100)]
ide-cd: unify request end exit path in cdrom_pc_intr()

This is a preparation for cdrom_pc_intr() and cdrom_newpc_intr() merge.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-cd: factor out request sense fixup from cdrom_pc_intr()
Bartlomiej Zolnierkiewicz [Fri, 1 Feb 2008 22:09:25 +0000 (23:09 +0100)]
ide-cd: factor out request sense fixup from cdrom_pc_intr()

This is a preparation for cdrom_pc_intr() and cdrom_newpc_intr() merge.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-cd: call blk_dump_rq_flags() on "missing data" in cdrom_newpc_intr()
Bartlomiej Zolnierkiewicz [Fri, 1 Feb 2008 22:09:25 +0000 (23:09 +0100)]
ide-cd: call blk_dump_rq_flags() on "missing data" in cdrom_newpc_intr()

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-cd: remove BUG_ON() from cdrom_newpc_intr()
Bartlomiej Zolnierkiewicz [Fri, 1 Feb 2008 22:09:25 +0000 (23:09 +0100)]
ide-cd: remove BUG_ON() from cdrom_newpc_intr()

There is no need for it anylonger and ide_set_handler() complains
if ->handler is not NULL anyway.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-cd: move code handling cdrom.c IOCTLs to ide-cd_ioctl.c
Bartlomiej Zolnierkiewicz [Fri, 1 Feb 2008 22:09:25 +0000 (23:09 +0100)]
ide-cd: move code handling cdrom.c IOCTLs to ide-cd_ioctl.c

There should be no functionality changes caused by this patch.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-cd: rename cdrom_* functions to ide_cd_*
Bartlomiej Zolnierkiewicz [Fri, 1 Feb 2008 22:09:24 +0000 (23:09 +0100)]
ide-cd: rename cdrom_* functions to ide_cd_*

* cdrom_prepare_request() -> ide_cd_init_rq()
* cdrom_queue_packet_command() -> ide_cd_queue_pc()
* cdrom_lockdoor() -> ide_cd_lockdoor()
* cdrom_read_toc() -> ide_cd_read_toc()
* cdrom_get_toc_entry() -> ide_cd_get_toc_entry()

This is a preparation to move code handling cdrom.c IOCTLs out of ide-cd.c.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-cd: coding style fixes for cdrom_get_toc_entry()
Bartlomiej Zolnierkiewicz [Fri, 1 Feb 2008 22:09:24 +0000 (23:09 +0100)]
ide-cd: coding style fixes for cdrom_get_toc_entry()

This is a preparation to move code handling cdrom.c IOCTLs out of ide-cd.c.

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-cd: move lba_to_msf() and msf_to_lba() to <linux/cdrom.h>
Bartlomiej Zolnierkiewicz [Fri, 1 Feb 2008 22:09:24 +0000 (23:09 +0100)]
ide-cd: move lba_to_msf() and msf_to_lba() to <linux/cdrom.h>

* Move lba_to_msf() and msf_to_lba() to <linux/cdrom.h>
  (use 'u8' type instead of 'byte' while at it).

* Remove msf_to_lba() copy from drivers/cdrom/cdrom.c.

Acked-by: Jens Axboe <jens.axboe@oracle.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-cd: merge cdrom_select_speed() into ide_cdrom_select_speed()
Bartlomiej Zolnierkiewicz [Fri, 1 Feb 2008 22:09:24 +0000 (23:09 +0100)]
ide-cd: merge cdrom_select_speed() into ide_cdrom_select_speed()

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-cd: merge cdrom_read_subchannel() into ide_cdrom_get_mcn()
Bartlomiej Zolnierkiewicz [Fri, 1 Feb 2008 22:09:24 +0000 (23:09 +0100)]
ide-cd: merge cdrom_read_subchannel() into ide_cdrom_get_mcn()

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-cd: merge cdrom_play_audio() into ide_cd_fake_play_trkind()
Bartlomiej Zolnierkiewicz [Fri, 1 Feb 2008 22:09:23 +0000 (23:09 +0100)]
ide-cd: merge cdrom_play_audio() into ide_cd_fake_play_trkind()

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-cd: factor out ioctl handlers from ide_cdrom_audio_ioctl()
Bartlomiej Zolnierkiewicz [Fri, 1 Feb 2008 22:09:23 +0000 (23:09 +0100)]
ide-cd: factor out ioctl handlers from ide_cdrom_audio_ioctl()

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-cd: move VERBOSE_IDE_CD_ERRORS code to ide-cd_verbose.c
Bartlomiej Zolnierkiewicz [Fri, 1 Feb 2008 22:09:23 +0000 (23:09 +0100)]
ide-cd: move VERBOSE_IDE_CD_ERRORS code to ide-cd_verbose.c

* Rename ide-cd kernel module to ide-cd_mod in preparation to moving code out
  from ide-cd.[c,h].   Add MODULE_ALIAS("ide-cd") to preserve compatibility.

* Move VERBOSE_IDE_CD_ERRORS code from ide-cd.[c,h] to ide-cd_verbose.c.

  ide-cd_verbose.c is IDE subsystem independent and may be easily converted
  into generic library usable by other drivers (i.e. libata) if needed.

* Add CONFIG_BLK_DEV_IDECD_VERBOSE_ERRORS config option to drivers/ide/Kconfig
  replacing VERBOSE_IDE_CD_ERRORS define.  Make this config option enabled by
  default and visible only if CONFIG_EMBEDDED is defined.

before the patch:
   text    data     bss     dec     hex filename
  22841     360    1056   24257    5ec1 drivers/ide/ide-cd.o

after the patch w/ CONFIG_BLK_DEV_IDECD_VERBOSE_ERRORS=y:
   text    data     bss     dec     hex filename
  22857     360    1056   24273    5ed1 drivers/ide/ide-cd_mod.o

after the patch w/ CONFIG_BLK_DEV_IDECD_VERBOSE_ERRORS=n:
   text    data     bss     dec     hex filename
  15091     360    1056   16507    407b drivers/ide/ide-cd_mod.o

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-cd: coding style fixes for VERBOSE_IDE_CD_ERRORS code
Bartlomiej Zolnierkiewicz [Fri, 1 Feb 2008 22:09:23 +0000 (23:09 +0100)]
ide-cd: coding style fixes for VERBOSE_IDE_CD_ERRORS code

* Coding style fixes for VERBOSE_IDE_CD_ERRORS code.

* Add KERN_{ERR,CONT} printk() levels where needed.

This is a preparation for moving this code out of ide-cd.[c,h].

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-cd: remove duplicate sense keys definitions from ide-cd.h
Bartlomiej Zolnierkiewicz [Fri, 1 Feb 2008 22:09:23 +0000 (23:09 +0100)]
ide-cd: remove duplicate sense keys definitions from ide-cd.h

ide-cd.c already uses sense keys definitions from <scsi/scsi.h>.

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-cd: re-organize handling of quirky devices
Bartlomiej Zolnierkiewicz [Fri, 1 Feb 2008 22:09:22 +0000 (23:09 +0100)]
ide-cd: re-organize handling of quirky devices

Re-organize handling of quirky devices:

* Add struct cd_list_entry, ide_cd_quirks_list[] and ide_cd_flags() helper.

* Set flags returned by ide_cd_flags() in ide_cdrom_setup().

* Add IDE_CD_FLAG_VERTOS_{300_SDD,600_ESD} and IDE_CD_FLAG_SANYO_3CD flags.

* Move device quirks from ide_cdrom_setup() to ide_cd_quirks_list[].

* Rename IDE_CD_FLAG_NEC260 to IDE_CD_FLAG_PRE_ATAPI12 and handle
  quirky Stingray 8X CD-ROM using ide_cd_quirks_list[].

* Add IDE_CD_FLAG_FULL_CAPS_PAGE flag and handle quirky ACER 50X CD-ROM
  / WPI 32X CD-ROM using ide_cd_quirk_list[].

* Add IDE_CD_FLAG_PLAY_AUDIO_OK flag and handle quirky MATSHITA DVD-ROMs
  using ide_cd_quirks_list[].

* Add IDE_CD_FLAG_LE_SPEED_FIELDS flag and handle quirky ACER/AOpen 24X
  CD-ROM using ide_cd_quirk_list[].

* Fix some comments about quirky devices while at it.

There should be no functionality changes caused by this patch.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-cd: use BCD2BIN()/BIN2BCD() macros from <linux/bcd.h>
Bartlomiej Zolnierkiewicz [Fri, 1 Feb 2008 22:09:22 +0000 (23:09 +0100)]
ide-cd: use BCD2BIN()/BIN2BCD() macros from <linux/bcd.h>

Use BCD2BIN()/BIN2BCD() macros from <linux/bcd.h>
and remove the local bcd2bin()/bin2bcd() inlines.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-cd: remove STANDARD_ATAPI define
Bartlomiej Zolnierkiewicz [Fri, 1 Feb 2008 22:09:22 +0000 (23:09 +0100)]
ide-cd: remove STANDARD_ATAPI define

Remove STANDARD_ATAPI define + drive-by coding style fixes.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-cd: remove NO_DOOR_LOCKING define
Bartlomiej Zolnierkiewicz [Fri, 1 Feb 2008 22:09:22 +0000 (23:09 +0100)]
ide-cd: remove NO_DOOR_LOCKING define

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-cd: remove struct ide_cd_{config,state}_flags
Bartlomiej Zolnierkiewicz [Fri, 1 Feb 2008 22:09:22 +0000 (23:09 +0100)]
ide-cd: remove struct ide_cd_{config,state}_flags

* Remove unused ->{writing,reserved} fields from struct ide_cd_config_flags.

* Move ->max_speed from struct ide_cd_config_flags to struct cdrom_info.

* Move ->current_speed from struct ide_cd_state_flags to struct cdrom_info.

* Add defines for config and state flags.

* Add 'unsigned int cd_flags' to struct cdrom_info and use ->cd_flags
  instead of ->{config,state}_flags.

* Remove no longer needed struct ide_cd_{config,state}_flags.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-cd: remove struct atapi_capabilities_page (take 2)
Bartlomiej Zolnierkiewicz [Fri, 1 Feb 2008 22:09:21 +0000 (23:09 +0100)]
ide-cd: remove struct atapi_capabilities_page (take 2)

* Remove struct atapi_capabilities_page.

* Add ATAPI_CAPABILITIES_PAGE[_PAD]_SIZE define.

v2:
* The buf[] array access indexes were swapped between 'curspeed'/'maxspeed'.
  (Noticed by Borislav Petkov).

Cc: Borislav Petkov <bbpetkov@yahoo.de>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-cd: kill CDROM_STATE_FLAGS() macro
Bartlomiej Zolnierkiewicz [Fri, 1 Feb 2008 22:09:21 +0000 (23:09 +0100)]
ide-cd: kill CDROM_STATE_FLAGS() macro

While at it rename 'info' variable to 'cd' in cdrom_saw_media_change().

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-cd: kill CDROM_CONFIG_FLAGS() macro
Bartlomiej Zolnierkiewicz [Fri, 1 Feb 2008 22:09:21 +0000 (23:09 +0100)]
ide-cd: kill CDROM_CONFIG_FLAGS() macro

While at it rename 'info' variable to 'cd' in
ide_cdrom_probe_capabilities() and ide_cdrom_setup().

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-cd: remove redundant config flags
Bartlomiej Zolnierkiewicz [Fri, 1 Feb 2008 22:09:20 +0000 (23:09 +0100)]
ide-cd: remove redundant config flags

* Use CDC_* flags directly and remove redundant flags from ->config_flags.

While at it:
* Add KERN_CONT to printk()-s in ide_cdrom_probe_capabilities().

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-cd: add IDE_CD_CAPABILITIES define
Bartlomiej Zolnierkiewicz [Fri, 1 Feb 2008 22:09:20 +0000 (23:09 +0100)]
ide-cd: add IDE_CD_CAPABILITIES define

While at it remove stale/incorrect comment.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-cd: cleanup ide_cdrom_update_speed()
Bartlomiej Zolnierkiewicz [Fri, 1 Feb 2008 22:09:20 +0000 (23:09 +0100)]
ide-cd: cleanup ide_cdrom_update_speed()

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-cd: remove struct atapi_{mechstat_header,changer_info,slot}
Bartlomiej Zolnierkiewicz [Fri, 1 Feb 2008 22:09:19 +0000 (23:09 +0100)]
ide-cd: remove struct atapi_{mechstat_header,changer_info,slot}

* Remove ->changer_info from struct cdrom_info (it is never allocated).

* Remove unused struct atapi_{mechstat_header,changer_info,slot}.

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-cd: remove unused and write-only struct ide_cd_config_flags fields
Bartlomiej Zolnierkiewicz [Fri, 1 Feb 2008 22:09:19 +0000 (23:09 +0100)]
ide-cd: remove unused and write-only struct ide_cd_config_flags fields

unused fields:
* ->writing
* ->reserved

write-only fields:
* ->playmsf_as_bcd
* ->subchan_as_bcd
* ->test_write
* ->supp_disc_present

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-cd: remove needless zeroing of 'info' fields from ide_cdrom_setup()
Bartlomiej Zolnierkiewicz [Fri, 1 Feb 2008 22:09:19 +0000 (23:09 +0100)]
ide-cd: remove needless zeroing of 'info' fields from ide_cdrom_setup()

ide_cd_probe() zeroes 'info' prior to calling ide_cdrom_setup() so there
is no need to explicitly zero 'info' fields in the latter function.

Ditto for fields of CDROM_STATE_FLAGS(), CDROM_CONFIG_FLAGS() and 'cdi'
(all are embedded in 'info').

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-cd: remove unused struct atapi_cdrom_subchnl
Bartlomiej Zolnierkiewicz [Fri, 1 Feb 2008 22:09:19 +0000 (23:09 +0100)]
ide-cd: remove unused struct atapi_cdrom_subchnl

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-cd: remove dead code from cdrom_pc_intr()
Bartlomiej Zolnierkiewicz [Fri, 1 Feb 2008 22:09:18 +0000 (23:09 +0100)]
ide-cd: remove dead code from cdrom_pc_intr()

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-cd: remove unused defines from ide-cd.h
Bartlomiej Zolnierkiewicz [Fri, 1 Feb 2008 22:09:18 +0000 (23:09 +0100)]
ide-cd: remove unused defines from ide-cd.h

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-cd: remove stale cdrom_transfer_packet_command() comment
Bartlomiej Zolnierkiewicz [Fri, 1 Feb 2008 22:09:18 +0000 (23:09 +0100)]
ide-cd: remove stale cdrom_transfer_packet_command() comment

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-cd: move historical changelog to Documentation/ide/ChangeLog.ide-cd.1994-2004
Bartlomiej Zolnierkiewicz [Fri, 1 Feb 2008 22:09:18 +0000 (23:09 +0100)]
ide-cd: move historical changelog to Documentation/ide/ChangeLog.ide-cd.1994-2004

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-cd: fix trailing whitespaces in changelog
Bartlomiej Zolnierkiewicz [Fri, 1 Feb 2008 22:09:18 +0000 (23:09 +0100)]
ide-cd: fix trailing whitespaces in changelog

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-cd: fix DMA error handling in cdrom_newpc_intr()
Bartlomiej Zolnierkiewicz [Fri, 1 Feb 2008 22:09:17 +0000 (23:09 +0100)]
ide-cd: fix DMA error handling in cdrom_newpc_intr()

Make cdrom_newpc_intr() match cdrom_{read,write}_intr() w.r.t.
handling DMA errors:

* disable DMA before cdrom_decode_status() call

* log the device name and the type of the request (read/write)

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-cd: fix "missing data" handling in cdrom_pc_intr()
Bartlomiej Zolnierkiewicz [Fri, 1 Feb 2008 22:09:17 +0000 (23:09 +0100)]
ide-cd: fix "missing data" handling in cdrom_pc_intr()

If drive still wants to transfer the data we need to pad the transfer
instead of just finishing the request.

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-cd: add ide_cd_pad_transfer() helper
Bartlomiej Zolnierkiewicz [Fri, 1 Feb 2008 22:09:17 +0000 (23:09 +0100)]
ide-cd: add ide_cd_pad_transfer() helper

Add ide_cd_pad_transfer() helper and use it in cdrom_[new]pc_intr()
and cdrom_{read,write}_check_ireason().

There should be no functionality changes caused by this patch.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-cd: use xfer_func_t in cdrom_pc_intr()
Bartlomiej Zolnierkiewicz [Fri, 1 Feb 2008 22:09:17 +0000 (23:09 +0100)]
ide-cd: use xfer_func_t in cdrom_pc_intr()

Unify writing and reading handling in cdrom_pc_intr() using xfer_func_t.

There should be no functionality changes caused by this patch.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide/ppc/pmac.c section fixes
Adrian Bunk [Fri, 1 Feb 2008 22:09:16 +0000 (23:09 +0100)]
ide/ppc/pmac.c section fixes

This patch fixes the following section mismatch:

<--  snip  -->

...
WARNING: vmlinux.o(.text+0x3b641c): Section mismatch in reference from the function .pmac_ide_setup_device() to the function .init.text:.pmac_ide_setup_dma()
...

<--  snip  -->

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: make wait_drive_not_busy() static again
Adrian Bunk [Fri, 1 Feb 2008 22:09:16 +0000 (23:09 +0100)]
ide: make wait_drive_not_busy() static again

After commit 7267c3377443322588cddaf457cf106839a60463
wait_drive_not_busy() can become static again.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: small ide-scan-pci.c cleanup
Adrian Bunk [Fri, 1 Feb 2008 22:09:16 +0000 (23:09 +0100)]
ide: small ide-scan-pci.c cleanup

- ide_scan_pcibus() can become static
- instead of ide_scan_pci() we can use ide_scan_pcibus() directly
  in module_init()

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: unexport ide_dma_on
Adrian Bunk [Fri, 1 Feb 2008 22:09:16 +0000 (23:09 +0100)]
ide: unexport ide_dma_on

ide_dma_on can be unexported.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide/Kconfig: use 'on-board' instead of 'built-in' in config options
Frans Pop [Fri, 1 Feb 2008 22:09:16 +0000 (23:09 +0100)]
ide/Kconfig: use 'on-board' instead of 'built-in' in config options

To avoid confusion between 'built-in' drivers and 'on-board'
controllers, consistently use the term 'on-board' for controllers.

Minor line-wrapping improvements in descriptions for config options.

[ Bart: thanks to Jan for 'built-in'->'on-board' suggestion ]

Signed-off-by: Frans Pop <elendil@planet.nl>
Cc: Jan Engelhardt <jengelh@computergmbh.de>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoAtari Falcon IDE: Add missing hwif variable
Geert Uytterhoeven [Fri, 1 Feb 2008 22:09:15 +0000 (23:09 +0100)]
Atari Falcon IDE: Add missing hwif variable

Commit cbb010c180294a5242a7681555c28737d9dd26ab

    ide: drop 'initializing' argument from ide_register_hw()

    * Rename init_hwif_data() to ide_init_port_data() and export it.

    * For all users of ide_register_hw() with 'initializing' argument set
      hwif->present and hwif->hold are always zero so convert these host
      drivers to use ide_find_port()+ide_init_port_data()+ide_init_port_hw()
      instead (also no need for init_hwif_default() call since the setup
      done by it gets over-ridden by ide_init_port_hw() call).

    * Drop 'initializing' argument from ide_register_hw().

introduced the usage of a hwif variable, but forgot to declare the actual
variable.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoMerge branch 'for-linus' of git://git.kernel.dk/linux-2.6-block
Linus Torvalds [Fri, 1 Feb 2008 10:48:45 +0000 (21:48 +1100)]
Merge branch 'for-linus' of git://git.kernel.dk/linux-2.6-block

* 'for-linus' of git://git.kernel.dk/linux-2.6-block:
  block: kill swap_io_context()
  as-iosched: fix inconsistent ioc->lock context
  ide-cd: fix leftover data BUG
  block: make elevator lib checkpatch compliant
  cfq-iosched: make checkpatch compliant
  block: make core bits checkpatch compliant
  block: new end request handling interface should take unsigned byte counts
  unexport add_disk_randomness
  block/sunvdc.c:print_version() must be __devinit
  splice: always updated atime in direct splice

16 years agoblock: kill swap_io_context()
Jens Axboe [Fri, 1 Feb 2008 10:34:49 +0000 (11:34 +0100)]
block: kill swap_io_context()

It blindly copies everything in the io_context, including the lock.
That doesn't work so well for either lock ordering or lockdep.

There seems zero point in swapping io contexts on a request to request
merge, so the best point of action is to just remove it.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
16 years agodocbook: rapidio: fix fatal filename error
Randy Dunlap [Fri, 1 Feb 2008 06:09:08 +0000 (22:09 -0800)]
docbook: rapidio: fix fatal filename error

Fix docbook fatal error (files were renamed):
docproc: linux-2.6.24-git9/arch/ppc/kernel/rio.c: No such file or directory

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agofix directory entry in arch-x86-Makefile
Steven Rostedt [Fri, 1 Feb 2008 05:13:58 +0000 (00:13 -0500)]
fix directory entry in arch-x86-Makefile

Doing a make randconfig I came across this error in the Makefile.

This patch makes a directory out of arch/x86/mach-default for
CONFIG_X86_RDC321X

Signed-off-by: Steven Rostedt <srostedt@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6
Linus Torvalds [Fri, 1 Feb 2008 10:06:56 +0000 (21:06 +1100)]
Merge git://git./linux/kernel/git/davem/sparc-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6:
  [SPARC64]: Fix inconsistent .section usage in lib/
  [SPARC/SPARC64]: Fix usage of .section .sched.text in assembler code.

16 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
Linus Torvalds [Fri, 1 Feb 2008 10:06:29 +0000 (21:06 +1100)]
Merge git://git./linux/kernel/git/davem/net-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (173 commits)
  [NETNS]: Lookup in FIB semantic hashes taking into account the namespace.
  [NETNS]: Add a namespace mark to fib_info.
  [IPV4]: fib_sync_down rework.
  [NETNS]: Process interface address manipulation routines in the namespace.
  [IPV4]: Small style cleanup of the error path in rtm_to_ifaddr.
  [IPV4]: Fix memory leak on error path during FIB initialization.
  [NETFILTER]: Ipv6-related xt_hashlimit compilation fix.
  [NET_SCHED]: Add flow classifier
  [NET_SCHED]: sch_sfq: make internal queues visible as classes
  [NET_SCHED]: sch_sfq: add support for external classifiers
  [NET_SCHED]: Constify struct tcf_ext_map
  [BLUETOOTH]: Fix bugs in previous conn add/del workqueue changes.
  [TCP]: Unexport sysctl_tcp_tso_win_divisor
  [IPV4]: Make struct ipv4_devconf static.
  [TR] net/802/tr.c: sysctl_tr_rif_timeout static
  [XFRM]: Fix statistics.
  [XFRM]: Remove unused exports.
  [PKT_SCHED] sch_teql.c: Duplicate IFF_BROADCAST in FMASK, remove 2nd.
  [BNX2]: Fix ASYM PAUSE advertisement for remote PHY.
  [IPV4] route cache: Introduce rt_genid for smooth cache invalidation
  ...

16 years agopasemi: Fix thinko in dma_direct_ops setup
Olof Johansson [Thu, 31 Jan 2008 23:50:02 +0000 (17:50 -0600)]
pasemi: Fix thinko in dma_direct_ops setup

[POWERPC] pasemi: Fix thinko in dma_direct_ops setup

The first patch will just fall through and still set dma_data to a bad
value, make it return directly instead.

Signed-off-by: Olof Johansson <olof@lixom.net>
Acked-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agom68knommu: remove dead timer int pending code
Greg Ungerer [Fri, 1 Feb 2008 07:40:52 +0000 (17:40 +1000)]
m68knommu: remove dead timer int pending code

Remove all the dead timer interrupt checking functions for the ColdFire
CPU "timers" hardware that are not used after switching to GENERIC_TIME.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agom68knommu: remove empty timer offset function for 68360
Greg Ungerer [Fri, 1 Feb 2008 07:40:49 +0000 (17:40 +1000)]
m68knommu: remove empty timer offset function for 68360

Switching to GENERIC_TIME means we no longer need the empty timer offset
function for the 68360 CPU.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agom68knommu: remove local gettimeofday code
Greg Ungerer [Fri, 1 Feb 2008 07:40:39 +0000 (17:40 +1000)]
m68knommu: remove local gettimeofday code

Remove unused local gettimeofday functions, now that we are using
GENERIC_TIME.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agom68knommu: set config to use GENERIC_TIME
Greg Ungerer [Fri, 1 Feb 2008 07:40:30 +0000 (17:40 +1000)]
m68knommu: set config to use GENERIC_TIME

Switch m68knommu arch to using GENERIC_TIME.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agom68knommu: switch ColdFire TIMER to use GENERIC_TIME
Greg Ungerer [Fri, 1 Feb 2008 07:40:26 +0000 (17:40 +1000)]
m68knommu: switch ColdFire TIMER to use GENERIC_TIME

Switch the ColdFire TIMER timer to use GENERIC_TIME.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agom68knommu: switch ColdFire PIT timer to use GENERIC_TIME
Greg Ungerer [Fri, 1 Feb 2008 07:40:21 +0000 (17:40 +1000)]
m68knommu: switch ColdFire PIT timer to use GENERIC_TIME

Switch the ColdFire PIT timer to using GENERIC_TIME.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agom68knommu: switch 68328 timer to use GENERIC_TIME
Greg Ungerer [Fri, 1 Feb 2008 07:40:17 +0000 (17:40 +1000)]
m68knommu: switch 68328 timer to use GENERIC_TIME

Switch the 68328 CPU timer code to using GENERIC_TIME.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agom68knommu: remove unused CONFIG_DISKtel symbol
Greg Ungerer [Fri, 1 Feb 2008 07:38:26 +0000 (17:38 +1000)]
m68knommu: remove unused CONFIG_DISKtel symbol

Remove unused CONFIG_DISKtel define.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agom68knommu: fix 528x ColdFire cache settings
Greg Ungerer [Fri, 1 Feb 2008 07:38:24 +0000 (17:38 +1000)]
m68knommu: fix 528x ColdFire cache settings

Fix problems with the 528x ColdFire CPU cache setup.
Do not cache the flash region (if present), and make the runtime
settings consistent with the init setting.

Problems pointed out by Bernd Buttner <b.buettner@mkc-gmbh.de>

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agom68knommu: use container_of in mcf.c
Greg Ungerer [Fri, 1 Feb 2008 07:38:34 +0000 (17:38 +1000)]
m68knommu: use container_of in mcf.c

Use container_of() instead of assuming local uart struct is first member
of uart_port struct.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agom68knommu: remove dead code from m68knommu timer code
Greg Ungerer [Fri, 1 Feb 2008 07:38:20 +0000 (17:38 +1000)]
m68knommu: remove dead code from m68knommu timer code

Remove unused LED heartbeat code from m68knommu timer code.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agom68knommu: use IRQF_DISABLE in m68328serial.c
Greg Ungerer [Fri, 1 Feb 2008 07:38:32 +0000 (17:38 +1000)]
m68knommu: use IRQF_DISABLE in m68328serial.c

Use IRQF_DISABLED instead of obsolete IRQ_FLG_STD for request_irq() flags
in m68328serial.c driver.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agom68knommu: create common DMA table for ColdFire CPUs
Greg Ungerer [Fri, 1 Feb 2008 07:38:03 +0000 (17:38 +1000)]
m68knommu: create common DMA table for ColdFire CPUs

Move the ColdFire DMA address table into its own file, and out
of each of the different CPU config files. No need to have a copy
of it in each of the config setup files.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agom68knommu: modify Makefiles to support common coldfire directory
Greg Ungerer [Fri, 1 Feb 2008 07:37:56 +0000 (17:37 +1000)]
m68knommu: modify Makefiles to support common coldfire directory

Modify Makefiles to support separate coldfire platform directory.

Currently the common ColdFire CPU family code sits in the
arch/m68knommu/platform/5307 directory. This is confusing, the files
containing this common code are in no way specific to the 5307 ColdFire.
Create an arch/m68knommu/platform/coldfire directory to contain this
common code. Other m68knommu CPU varients do not need use this code
though, so it doesn't make sense to move it to arch/m68knommu/kernel.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agom68knommu: move ColdFire vectors.c to its own coldfire directory
Greg Ungerer [Fri, 1 Feb 2008 07:37:46 +0000 (17:37 +1000)]
m68knommu: move ColdFire vectors.c to its own coldfire directory

Move common ColdFire CPU vectors.c to common coldfire platform directory.

Currently the common ColdFire CPU family code sits in the
arch/m68knommu/platform/5307 directory. This is confusing, the files
containing this common code are in no way specific to the 5307 ColdFire.
Create an arch/m68knommu/platform/coldfire directory to contain this
common code. Other m68knommu CPU varients do not need use this code
though, so it doesn't make sense to move it to arch/m68knommu/kernel.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agom68knommu: move ColdFire timers.c to its own coldfire directory
Greg Ungerer [Fri, 1 Feb 2008 07:37:39 +0000 (17:37 +1000)]
m68knommu: move ColdFire timers.c to its own coldfire directory

Move common ColdFire CPU timers.c to common coldfire platform directory.

Currently the common ColdFire CPU family code sits in the
arch/m68knommu/platform/5307 directory. This is confusing, the files
containing this common code are in no way specific to the 5307 ColdFire.
Create an arch/m68knommu/platform/coldfire directory to contain this
common code. Other m68knommu CPU varients do not need use this code
though, so it doesn't make sense to move it to arch/m68knommu/kernel.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agom68knommu: move ColdFire pit.c to its own coldfire directory
Greg Ungerer [Fri, 1 Feb 2008 07:37:36 +0000 (17:37 +1000)]
m68knommu: move ColdFire pit.c to its own coldfire directory

Move common ColdFire CPU pit.c to common coldfire platform directory.

Currently the common ColdFire CPU family code sits in the
arch/m68knommu/platform/5307 directory. This is confusing, the files
containing this common code are in no way specific to the 5307 ColdFire.
Create an arch/m68knommu/platform/coldfire directory to contain this
common code. Other m68knommu CPU varients do not need use this code
though, so it doesn't make sense to move it to arch/m68knommu/kernel.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agom68knommu: move ColdFire head.S to its own coldfire directory
Greg Ungerer [Fri, 1 Feb 2008 07:37:28 +0000 (17:37 +1000)]
m68knommu: move ColdFire head.S to its own coldfire directory

Move common ColdFire CPU head.S to common coldfire platform directory.

Currently the common ColdFire CPU family code sits in the
arch/m68knommu/platform/5307 directory. This is confusing, the files
containing this common code are in no way specific to the 5307 ColdFire.
Create an arch/m68knommu/platform/coldfire directory to contain this
common code. Other m68knommu CPU varients do not need use this code
though, so it doesn't make sense to move it to arch/m68knommu/kernel.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agom68knommu: move ColdFire entry.S to its own coldfire directory
Greg Ungerer [Fri, 1 Feb 2008 07:37:18 +0000 (17:37 +1000)]
m68knommu: move ColdFire entry.S to its own coldfire directory

Move common ColdFire CPU entry.S to common coldfire platform directory.

Currently the common ColdFire CPU family code sits in the
arch/m68knommu/platform/5307 directory. This is confusing, the files
containing this common code are in no way specific to the 5307 ColdFire.
Create an arch/m68knommu/platform/coldfire directory to contain this
common code. Other m68knommu CPU varients do not need use this code
though, so it doesn't make sense to move it to arch/m68knommu/kernel.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agom68knommu: platform setup for 5407 ColdFire parts
Greg Ungerer [Fri, 1 Feb 2008 07:35:03 +0000 (17:35 +1000)]
m68knommu: platform setup for 5407 ColdFire parts

Switch to platform style configuration for 5407 ColdFire parts.
Initial support is for the UARTs. DMA support moved to common code
for all ColdFire parts.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agom68knommu: platform setup for 532x ColdFire parts
Greg Ungerer [Fri, 1 Feb 2008 07:34:58 +0000 (17:34 +1000)]
m68knommu: platform setup for 532x ColdFire parts

Switch to platform style configuration for 532x ColdFire parts.
Initial support is for the UARTs. DMA support moved to common code
for all ColdFire parts.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agom68knommu: platform setup for 527x ColdFire parts
Greg Ungerer [Fri, 1 Feb 2008 07:34:40 +0000 (17:34 +1000)]
m68knommu: platform setup for 527x ColdFire parts

Switch to platform style configuration for 527x ColdFire parts.
Initial support is for the UARTs. DMA support moved to common code
for all ColdFire parts.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agom68knommu: platform setup for 5307 ColdFire parts
Greg Ungerer [Fri, 1 Feb 2008 07:34:55 +0000 (17:34 +1000)]
m68knommu: platform setup for 5307 ColdFire parts

Switch to platform style configuration for 5307 ColdFire parts.
Initial support is for the UARTs. DMA support moved to common code
for all ColdFire parts.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agom68knommu: platform setup for 528x ColdFire parts
Greg Ungerer [Fri, 1 Feb 2008 07:34:50 +0000 (17:34 +1000)]
m68knommu: platform setup for 528x ColdFire parts

Switch to platform style configuration for 528x ColdFire parts.
Initial support is for the UARTs. DMA support moved to common code
for all ColdFire parts.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agom68knommu: platform setup for 5249 ColdFire parts
Greg Ungerer [Fri, 1 Feb 2008 07:34:30 +0000 (17:34 +1000)]
m68knommu: platform setup for 5249 ColdFire parts

Switch to platform style configuration for 5249 ColdFire parts.
Initial support is for the UARTs. DMA support moved to common code
for all ColdFire parts.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agom68knommu: platform setup for 5272 ColdFire parts
Greg Ungerer [Fri, 1 Feb 2008 07:34:32 +0000 (17:34 +1000)]
m68knommu: platform setup for 5272 ColdFire parts

Switch to platform style configuration for 5272 ColdFire parts.
Initial support is for the UARTs. DMA support moved to common code
for all ColdFire parts.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>