Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions arch/mips/configs/ps2_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -932,6 +932,7 @@ CONFIG_NET_VENDOR_MELLANOX=y
# CONFIG_NET_VENDOR_NI is not set
# CONFIG_ETHOC is not set
# CONFIG_NET_VENDOR_PENSANDO is not set
CONFIG_PS2_SMAP=m
# CONFIG_NET_VENDOR_QUALCOMM is not set
# CONFIG_NET_VENDOR_RENESAS is not set
# CONFIG_NET_VENDOR_ROCKER is not set
Expand Down
56 changes: 56 additions & 0 deletions arch/mips/ps2/devices.c
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,61 @@ static struct platform_device pata_device = {
.resource = pata_resources,
};

/*
* The SMAP part of the SPEED chip in the expansion bay. The chip window
* starts at physical 0x14000000 and holds the ATA registers as well, at
* IOP_PATA_BASE, so SMAP is described as the two ranges it actually uses
* rather than as one block: the revision and interrupt registers below the
* ATA window, and everything from the buffer descriptor mode register up,
* which covers both FIFO data ports, the EMAC3 registers and the two
* descriptor rings. Declaring the whole window instead would collide with
* the ATA device above and leave SMAP unregistered.
*
* The hardware only answers once iop-dev9 has powered the expansion bay,
* which the driver verifies through the IOP before it touches the window.
*/
#define SPEED_BASE 0x14000000

static struct resource smap_resources[] = {
[0] = {
.name = "speed",
.start = SPEED_BASE,
.end = SPEED_BASE + 0x3f,
.flags = IORESOURCE_MEM,
},
[1] = {
.name = "smap",
.start = SPEED_BASE + 0x100,
.end = SPEED_BASE + 0x3fff,
.flags = IORESOURCE_MEM,
},
[2] = {
.name = "rx",
.start = IRQ_IOP_SPD_RXEND,
.end = IRQ_IOP_SPD_RXEND,
.flags = IORESOURCE_IRQ,
},
[3] = {
.name = "tx",
.start = IRQ_IOP_SPD_TXEND,
.end = IRQ_IOP_SPD_TXEND,
.flags = IORESOURCE_IRQ,
},
[4] = {
.name = "emac3",
.start = IRQ_IOP_SPD_EMAC3,
.end = IRQ_IOP_SPD_EMAC3,
.flags = IORESOURCE_IRQ,
},
};

static struct platform_device smap_device = {
.name = "ps2-smap",
.id = -1,
.num_resources = ARRAY_SIZE(smap_resources),
.resource = smap_resources,
};

static struct resource gs_resources[] = {
[0] = {
.name = "Graphics Synthesizer",
Expand Down Expand Up @@ -113,6 +168,7 @@ static struct platform_device *ps2_platform_devices[] __initdata = {
&iop_device,
&ohci_device,
&pata_device,
&smap_device,
&gs_device,
&gs_drm_device, /* FIXME */
&rtc_device,
Expand Down
1 change: 1 addition & 0 deletions drivers/net/ethernet/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ config ETHOC
source "drivers/net/ethernet/packetengines/Kconfig"
source "drivers/net/ethernet/pasemi/Kconfig"
source "drivers/net/ethernet/pensando/Kconfig"
source "drivers/net/ethernet/ps2/Kconfig"
source "drivers/net/ethernet/qlogic/Kconfig"
source "drivers/net/ethernet/qualcomm/Kconfig"
source "drivers/net/ethernet/rdc/Kconfig"
Expand Down
1 change: 1 addition & 0 deletions drivers/net/ethernet/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -96,3 +96,4 @@ obj-$(CONFIG_NET_VENDOR_XILINX) += xilinx/
obj-$(CONFIG_NET_VENDOR_XIRCOM) += xircom/
obj-$(CONFIG_NET_VENDOR_SYNOPSYS) += synopsys/
obj-$(CONFIG_NET_VENDOR_PENSANDO) += pensando/
obj-$(CONFIG_NET_VENDOR_PS2) += ps2/
37 changes: 37 additions & 0 deletions drivers/net/ethernet/ps2/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# SPDX-License-Identifier: GPL-2.0-only
#
# PlayStation 2 network device configuration
#

config NET_VENDOR_PS2
bool "PlayStation 2 devices"
default y
depends on SONY_PS2
help
If you have a network (Ethernet) card belonging to this class, say Y.

Note that the answer to this question doesn't directly affect the
kernel: saying N will just cause the configurator to skip all the
questions about PlayStation 2 cards. If you say Y, you will be asked
for your specific card in the following questions.

if NET_VENDOR_PS2

config PS2_SMAP
tristate "PlayStation 2 SMAP Ethernet"
depends on SONY_PS2
select PHYLIB
help
Ethernet support for the SMAP part of the SPEED chip found in the
PlayStation 2 expansion bay network adaptor and, on later models,
soldered to the board. The chip combines an IBM EMAC3 MAC with a
National DP83846 PHY and is reachable from the EE once the DEV9
expansion bay is powered.

Data is moved by programmed I/O; the IOP-side DMA of the original
Sony driver is not implemented.

To compile this driver as a module, choose M here. The module will
be called ps2-smap.

endif # NET_VENDOR_PS2
6 changes: 6 additions & 0 deletions drivers/net/ethernet/ps2/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# SPDX-License-Identifier: GPL-2.0-only
#
# Makefile for the PlayStation 2 network device drivers.
#

obj-$(CONFIG_PS2_SMAP) += ps2-smap.o
Loading