All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Daney <ddaney.cavm@gmail.com>
To: Aaro Koskinen <aaro.koskinen@iki.fi>, Ralf Baechle <ralf@linux-mips.org>
Cc: linux-mips@linux-mips.org
Subject: Re: [PATCH v2 2/2] MIPS: cavium-octeon: enable interfaces on EdgeRouter Lite
Date: Mon, 24 Jun 2013 11:48:48 -0700	[thread overview]
Message-ID: <51C89490.2060307@gmail.com> (raw)
In-Reply-To: <1372023524-17333-2-git-send-email-aaro.koskinen@iki.fi>

On 06/23/2013 02:38 PM, Aaro Koskinen wrote:
> Enable interfaces on EdgeRouter Lite. Tested with cavium_octeon_defconfig
> and busybox shell. DHCP & ping works with eth0, eth1 and eth2.
>
> The board type "UBNT_E100" is taken from the sources of the vendor kernel
> shipped with the product.
>
> Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>

I don't have a board to verify any of this, but...

Acked-by: David Daney <david.daney@cavium.com>


> ---
>   arch/mips/cavium-octeon/executive/cvmx-helper-board.c | 13 +++++++++++++
>   arch/mips/include/asm/octeon/cvmx-bootinfo.h          |  2 ++
>   2 files changed, 15 insertions(+)
>
> diff --git a/arch/mips/cavium-octeon/executive/cvmx-helper-board.c b/arch/mips/cavium-octeon/executive/cvmx-helper-board.c
> index 9838c0e..2fcf030 100644
> --- a/arch/mips/cavium-octeon/executive/cvmx-helper-board.c
> +++ b/arch/mips/cavium-octeon/executive/cvmx-helper-board.c
> @@ -183,6 +183,11 @@ int cvmx_helper_board_get_mii_address(int ipd_port)
>   			return ipd_port - 16 + 4;
>   		else
>   			return -1;
> +	case CVMX_BOARD_TYPE_UBNT_E100:
> +		if (ipd_port >= 0 && ipd_port <= 2)
> +			return 7 - ipd_port;
> +		else
> +			return -1;
>   	}
>
>   	/* Some unknown board. Somebody forgot to update this function... */
> @@ -707,6 +712,14 @@ int __cvmx_helper_board_hardware_enable(int interface)
>   				}
>   			}
>   		}
> +	} else if (cvmx_sysinfo_get()->board_type ==
> +			CVMX_BOARD_TYPE_UBNT_E100) {
> +		cvmx_write_csr(CVMX_ASXX_RX_CLK_SETX(0, interface), 0);
> +		cvmx_write_csr(CVMX_ASXX_TX_CLK_SETX(0, interface), 0x10);
> +		cvmx_write_csr(CVMX_ASXX_RX_CLK_SETX(1, interface), 0);
> +		cvmx_write_csr(CVMX_ASXX_TX_CLK_SETX(1, interface), 0x10);
> +		cvmx_write_csr(CVMX_ASXX_RX_CLK_SETX(2, interface), 0);
> +		cvmx_write_csr(CVMX_ASXX_TX_CLK_SETX(2, interface), 0x10);
>   	}
>   	return 0;
>   }
> diff --git a/arch/mips/include/asm/octeon/cvmx-bootinfo.h b/arch/mips/include/asm/octeon/cvmx-bootinfo.h
> index 284fa8d..7b7818d 100644
> --- a/arch/mips/include/asm/octeon/cvmx-bootinfo.h
> +++ b/arch/mips/include/asm/octeon/cvmx-bootinfo.h
> @@ -227,6 +227,7 @@ enum cvmx_board_types_enum {
>   	 * use any numbers in this range.
>   	 */
>   	CVMX_BOARD_TYPE_CUST_PRIVATE_MIN = 20001,
> +	CVMX_BOARD_TYPE_UBNT_E100 = 20002,
>   	CVMX_BOARD_TYPE_CUST_PRIVATE_MAX = 30000,
>
>   	/* The remaining range is reserved for future use. */
> @@ -325,6 +326,7 @@ static inline const char *cvmx_board_type_to_string(enum
>
>   		    /* Customer private range */
>   		ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_CUST_PRIVATE_MIN)
> +		ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_UBNT_E100)
>   		ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_CUST_PRIVATE_MAX)
>   	}
>   	return "Unsupported Board";
>

  reply	other threads:[~2013-06-24 18:49 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-23 21:38 [PATCH v2 1/2] MIPS: cavium-octeon: cvmx-helper-board: print unknown board warning only once Aaro Koskinen
2013-06-23 21:38 ` [PATCH v2 2/2] MIPS: cavium-octeon: enable interfaces on EdgeRouter Lite Aaro Koskinen
2013-06-24 18:48   ` David Daney [this message]
2013-06-28 21:41     ` Aaro Koskinen
2013-06-24 18:52 ` [PATCH v2 1/2] MIPS: cavium-octeon: cvmx-helper-board: print unknown board warning only once David Daney
2013-06-24 22:04   ` Aaro Koskinen
2013-06-24 22:33     ` David Daney
2013-06-24 23:06       ` Aaro Koskinen
2013-06-24 23:24         ` David Daney
2013-06-26 18:47 ` Ralf Baechle
2013-06-28 22:58   ` Aaro Koskinen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=51C89490.2060307@gmail.com \
    --to=ddaney.cavm@gmail.com \
    --cc=aaro.koskinen@iki.fi \
    --cc=linux-mips@linux-mips.org \
    --cc=ralf@linux-mips.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.