Commit Graph

153 Commits

Author SHA1 Message Date
dyoung
a6b2b8396b PCI_FLAGS_IO_ENABLED and PCI_FLAGS_MEM_ENABLED changed their functional
role in NetBSD (drivers are no longer supposed to write these to
pa_flags) without changing name.  Correct that.

Rename PCI_FLAGS_IO_ENABLED to PCI_FLAGS_IO_OKAY and
PCI_FLAGS_MEM_ENABLED to PCI_FLAGS_MEM_OKAY, thus making their names
consistent with the other PCI flags and poisoning 3rd-party driver
sources that use the flags in the old bad way.

This patch produces no binary changes in this set of PCI kernels when
they are compiled w/o 'options DIAGNOSTIC' and w/ -V MKREPRO=yes:

algor P4032 P5064 P6032
alpha GENERIC
amd64 GENERIC XEN3_DOM0
arc GENERIC
atari HADES MILAN-PCIIDE
bebox GENERIC
cats GENERIC
cobalt GENERIC
evbarm-el ADI_BRH ARMADILLO9 CP3100 GEMINI GEMINI_MASTER GEMINI_SLAVE
evbarm-el GUMSTIX HDL_G IMX31LITE INTEGRATOR IQ31244 IQ80310 IQ80321
evbarm-el IXDP425 IXM1200 KUROBOX_PRO
evbarm-el LUBBOCK MARVELL_NAS NAPPI NSLU2 SHEEVAPLUG SMDK2800 TEAMASA_NPWR
evbarm-el TEAMASA_NPWR_FC TS7200 TWINTAIL ZAO425
evbmips-el AP30 DBAU1500 DBAU1550 MALTA MERAKI MTX-1 OMSAL400 RB153 WGT624V3
evbmips64-el XLSATX
evbppc EV64260 MPC8536DS MPC8548CDS OPENBLOCKS200 OPENBLOCKS266
evbppc OPENBLOCKS266_OPT P2020RDB PMPPC RB800 WALNUT
hp700 GENERIC
i386 ALL XEN3_DOM0 XEN3_DOMU
ibmnws GENERIC
iyonix GENERIC
landisk GENERIC
macppc GENERIC
mvmeppc GENERIC
netwinder GENERIC
ofppc GENERIC
prep GENERIC
sandpoint GENERIC
sbmips-el GENERIC
sgimips GENERIC32_IP2x GENERIC32_IP3x
sparc GENERIC_SUN4U KRUPS
sparc64 GENERIC
2011-05-17 17:34:47 +00:00
rmind
2626d57668 Rename ttymalloc() to tty_alloc(), and ttyfree() to tty_free() for
consistency.  Remove some unnecessary malloc.h inclusions as well.
2011-04-24 16:26:51 +00:00
dyoung
d3e53912d2 Neither pci_dma64_available(), pci_probe_device(), pci_mapreg_map(9),
pci_find_rom(), pci_intr_map(9), pci_enumerate_bus(), nor the match
predicate passed to pciide_compat_intr_establish() should ever modify
their pci_attach_args argument, so make their pci_attach_args arguments
const and deal with the fallout throughout the kernel.

For the most part, these changes add a 'const' where there was no
'const' before, however, some drivers and MD code used to modify
pci_attach_args.  Now those drivers either copy their pci_attach_args
and modify the copy, or refrain from modifying pci_attach_args:

Xen: according to Manuel Bouyer, writing to pci_attach_args in
    pci_intr_map() was a leftover from Xen 2.  Probably a bug.  I
    stopped writing it.  I have not tested this change.

siside(4): sis_hostbr_match() needlessly wrote to pci_attach_args.
    Probably a bug.  I use a temporary variable.  I have not tested this
    change.

slide(4): sl82c105_chip_map() overwrote the caller's pci_attach_args.
    Probably a bug.  Use a local pci_attach_args.  I have not tested
    this change.

viaide(4): via_sata_chip_map() and via_sata_chip_map_new() overwrote the
    caller's pci_attach_args.  Probably a bug.  Make a local copy of the
    caller's pci_attach_args and modify the copy.  I have not tested
    this change.

While I'm here, make pci_mapreg_submap() static.

With these changes in place, I have tested the compilation of these
kernels:

alpha GENERIC
amd64 GENERIC XEN3_DOM0
arc GENERIC
atari HADES MILAN-PCIIDE
bebox GENERIC
cats GENERIC
cobalt GENERIC
evbarm-eb NSLU2
evbarm-el ADI_BRH ARMADILLO9 CP3100 GEMINI GEMINI_MASTER GEMINI_SLAVE GUMSTIX
	HDL_G IMX31LITE INTEGRATOR IQ31244 IQ80310 IQ80321 IXDP425 IXM1200
	KUROBOX_PRO LUBBOCK MARVELL_NAS NAPPI SHEEVAPLUG SMDK2800 TEAMASA_NPWR
	TEAMASA_NPWR_FC TS7200 TWINTAIL ZAO425
evbmips-el AP30 DBAU1500 DBAU1550 MALTA MERAKI MTX-1 OMSAL400 RB153 WGT624V3
evbmips64-el XLSATX
evbppc EV64260 MPC8536DS MPC8548CDS OPENBLOCKS200 OPENBLOCKS266
	OPENBLOCKS266_OPT P2020RDB PMPPC RB800 WALNUT
hp700 GENERIC
i386 ALL XEN3_DOM0 XEN3_DOMU
ibmnws GENERIC
macppc GENERIC
mvmeppc GENERIC
netwinder GENERIC
ofppc GENERIC
prep GENERIC
sandpoint GENERIC
sgimips GENERIC32_IP2x
sparc GENERIC_SUN4U KRUPS
sparc64 GENERIC

As of Sun Apr 3 15:26:26 CDT 2011, I could not compile these kernels
with or without my patches in place:

### evbmips-el GDIUM

nbmake: nbmake: don't know how to make /home/dyoung/pristine-nbsd/src/sys/arch/mips/mips/softintr.c. Stop

### evbarm-el MPCSA_GENERIC
src/sys/arch/evbarm/conf/MPCSA_GENERIC:318: ds1672rtc*: unknown device `ds1672rtc'

### ia64 GENERIC

/tmp/genassym.28085/assym.c: In function 'f111':
/tmp/genassym.28085/assym.c:67: error: invalid application of 'sizeof' to incomplete type 'struct pcb'
/tmp/genassym.28085/assym.c:76: error: dereferencing pointer to incomplete type

### sgimips GENERIC32_IP3x

crmfb.o: In function `crmfb_attach':
crmfb.c:(.text+0x2304): undefined reference to `ddc_read_edid'
crmfb.c:(.text+0x2304): relocation truncated to fit: R_MIPS_26 against `ddc_read_edid'
crmfb.c:(.text+0x234c): undefined reference to `edid_parse'
crmfb.c:(.text+0x234c): relocation truncated to fit: R_MIPS_26 against `edid_parse'
crmfb.c:(.text+0x2354): undefined reference to `edid_print'
crmfb.c:(.text+0x2354): relocation truncated to fit: R_MIPS_26 against `edid_print'
2011-04-04 20:37:49 +00:00
christos
97ea5c269b fix typo, and use the parent to determine the offset. From Dave Mills 2011-03-07 13:58:32 +00:00
christos
b5c8479490 don't abuse cf_unit, requested by phone. 2011-03-06 17:00:16 +00:00
christos
0b4b684637 From Dave Mills: It would appear that the two PHYs can only be
accessed from the registers of controller0 (mvgbec0) hence why both
PHYs are being detected on controller0. I have made the assumption
that PHY0 => controller0 (mvgbec0), PHY1 => controller1(mvgbec1)
and developed a patch accordingly. Also the irq is 15 for controller1
not 14.
2011-03-05 18:28:13 +00:00
nonaka
833f453410 - Don't switch MMC high-speed timing, if host controller isn't supported.
- Only check EXT_CSD STRUCTURE version when CSD version is 3.
- initialize width at sdmmc_function_alloc().
2011-02-13 06:43:51 +00:00
nonaka
2431d55e10 Don't switch SD high-speed timing, if host controller isn't supported. 2011-02-05 15:45:21 +00:00
jakllsch
e43028272f Various improvements to mvgbe(4). Notable is improved multicast filtering. 2011-02-01 23:40:12 +00:00
jakllsch
12fe79019c Use macros for ring position advances, assuming a power of two ring size.
(Also, spelling correction in comment.)
2011-01-29 01:53:18 +00:00
jakllsch
ecf43b9314 Set mva_size in the console case.
Addresses first portion of PR#43990.
2011-01-28 16:12:22 +00:00
jakllsch
597f6fa369 Explicitly initialize sometimes-unused variable. 2011-01-23 18:13:42 +00:00
uebayasi
19b39d64b4 Include uvm/uvm_extern.h to access uvmexp. gtmpsc.c doesn't need
uvm(9) API at all.
2010-11-14 03:49:52 +00:00
uebayasi
8184d5dc03 Don't pull in the whole uvm(9) API to access only PAGE_SIZE and
some other constants.  These are provided by sys/param.h now.
2010-11-13 13:51:57 +00:00
kiyohara
7e0b12518d Enable product MV78100/MV78200. 2010-10-30 05:46:12 +00:00
kiyohara
95bbad455e Support vendor dependent functions. 2010-10-16 05:29:29 +00:00
kiyohara
fc53f5307a Add timeout for wait.
Not send STOP, if received ACK.
2010-10-10 04:49:48 +00:00
kiyohara
171c49e42c Add more explanation to XXXX. It value from Marvell LSP. 2010-10-08 11:20:22 +00:00
kiyohara
0ad10ce34f Fix ack/no-ack. Last data sends with stop-bit without ack. 2010-10-03 07:14:33 +00:00
kiyohara
f876f061d1 Support Kirkwood's GbE. 2010-10-02 05:57:42 +00:00
kiyohara
d7b57ebb2b Add Marvell EHCI Controller wrapper.
However, because this driver has some problems now, it will not work the
way things are going.
2010-10-02 05:53:37 +00:00
kiyohara
c9cd553838 Add Marvell Secure Digital Input/Output (SDIO) Interface Driver. 2010-09-23 12:36:01 +00:00
kiyohara
e9e049ccf0 Add include opt_com.h. 2010-09-04 05:01:20 +00:00
kiyohara
049fc26168 Cleanup foo_match().
+ Remove check for model.
  + Remove unnecessary null line.
2010-08-01 06:57:06 +00:00
kiyohara
bb67784ce9 Cleanup mvuart_match(). 2010-08-01 06:47:16 +00:00
kiyohara
24eff00c48 Remove some attribute macros. Its specifically for Orion. 2010-07-20 12:01:33 +00:00
kiyohara
88f9b614ac Add macro MARVELL_ORION_1_88F6183.
Add some comments.
  Product ID of Discovery V maybe 0x6450.
  Product ID of Discovery VI maybe 0x6490.
2010-07-20 11:56:47 +00:00
kiyohara
0664db2b43 Add some Kirkwood/Discovery Innovation products. 2010-07-20 11:50:18 +00:00
kiyohara
0326b42837 Fix information on the product with comment-out. This was obtained from
the data sheet of Marvell.
2010-07-20 11:47:59 +00:00
kiyohara
c766e06918 Add notes for remembrance' sake. This is information obtained looking for
www.marvell.com.
2010-07-20 11:42:22 +00:00
kiyohara
f86aa060f7 Add MARVELL_TAG_MAX to enum marvell_tags. 2010-07-20 11:37:39 +00:00
kiyohara
9cccbb6195 Add Kirkwood/Discovery Innovation macros. 2010-07-13 14:00:07 +00:00
kiyohara
8406aeece8 Add SATA for Marvell SC/SoC. 2010-07-13 13:05:05 +00:00
kiyohara
f99b65b3f2 Add UART and PCIe controller for Marvell SoC.
However not define attribute *_mbus in our tree yet.
2010-07-13 11:16:02 +00:00
kiyohara
2c444bf727 Add macro MVA_{UNIT,OFFSET,IRQ}_DEFAULT. 2010-07-11 08:43:36 +00:00
kiyohara
c1903f8449 Remove unnecessary define.
Reorder.
Add necessary attributes.
2010-07-11 08:34:57 +00:00
kiyohara
8a73a79a6f Fix debug messages.
- s/DEBUG/GT_DEBUG/.
  - Indent.
  - The old one is 20 bits in the mask of the address register, and the
    new one is 16 bits.
2010-06-09 02:19:51 +00:00
kiyohara
14a717de1d Support big endian machines. 2010-06-08 05:15:52 +00:00
kiyohara
a0143cae24 Fix sume bugs.
- Why +1 ?
  - mvidmac_dump_xoredesc() -> gtidmac_dump_xoredesc().
  - bitmask_snprintf() -> snprintb().
Support big endian machines with GTIDMAC_CCHR_ENDIAN_BE.
2010-06-04 06:31:50 +00:00
kiyohara
742d392da8 Move memory protection parameters to MI part.
Gtpci believes the initialization of the firmware(boot-loader) if protection
information is not obtained.
2010-06-02 06:44:32 +00:00
kiyohara
17a4632c34 Set NULL to tag when the property doesn't get it. 2010-06-02 06:33:40 +00:00
kiyohara
a52a1474bf Remove unused gpio.h. 2010-06-02 06:24:59 +00:00
kiyohara
3224e25a97 Add Marvell Gigabit Ethernet Controller on SC/SoC.
Will support on ofppc soon.
  Tested on G4+PegasosII (kiyohara@)
	    G3+PegasosII (phx@)
2010-06-02 06:18:11 +00:00
kiyohara
e9d9dba532 Use kmem(9) instead of malloc(9) in gtidmac_attach(). 2010-06-02 06:05:32 +00:00
kiyohara
dedb67d0a4 Erase the old definition macro that forgot to be erased. 2010-06-02 06:02:20 +00:00
kiyohara
d2e6cc1913 Remove unused header-file. 2010-06-02 05:59:36 +00:00
kiyohara
a5e8bd5f06 Enable gtidmac. 2010-05-07 17:06:32 +00:00
kiyohara
fca22c5f5d Use macro PCI_PRODUCT_MARVELL_MV64[34]60. 2010-05-07 14:25:07 +00:00
kiyohara
a748aedcb5 Clean up gt and peripherals.
This change tested compile only.
2010-04-28 13:51:55 +00:00
joerg
58e867556f Push the bpf_ops usage back into bpf.h. Push the common ifp->if_bpf
check into the inline functions as well the fourth argument for
bpf_attach.
2010-04-05 07:19:28 +00:00