/*
* Copyright (c) 2001 ARM Ltd
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. The name of the company may not be used to endorse or promote
* products derived from this software without specific prior written
* permission.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
/*
* Integrator FPGA core logic support.
*
* The integrator board supports the core logic in an FPGA which is loaded
* at POR with a custom design. This code supports the default logic as the
* board is shipped.
*/
/* Now map in the IFPGA motherboard registers. */
if (bus_space_map(sc->sc_iot, IFPGA_IO_SC_BASE, IFPGA_IO_SC_SIZE, 0,
&sc->sc_sc_ioh))
panic("%s: Cannot map system controller registers",
device_xname(self));
id = bus_space_read_4(sc->sc_iot, sc->sc_sc_ioh, IFPGA_SC_ID);
printf(": Build %d, ", (id & IFPGA_SC_ID_BUILD_MASK) >>
IFPGA_SC_ID_BUILD_SHIFT);
switch (id & IFPGA_SC_ID_REV_MASK)
{
case IFPGA_SC_ID_REV_A:
printf("Rev A, ");
break;
case IFPGA_SC_ID_REV_B:
printf("Rev B, ");
break;
}
printf("Manufacturer ");
switch (id & IFPGA_SC_ID_MAN_MASK)
{
case IFPGA_SC_ID_MAN_ARM:
printf("ARM Ltd,");
break;
default:
printf("Unknown,");
break;
}
switch (id & IFPGA_SC_ID_ARCH_MASK)
{
case IFPGA_SC_ID_ARCH_ASBLE:
printf(" ASB, Little-endian,");
break;
case IFPGA_SC_ID_ARCH_AHBLE:
printf(" AHB, Little-endian,");
break;
default:
panic(" Unsupported bus");
}
printf("\n%s: FPGA ", device_xname(self));
switch (id & IFPGA_SC_ID_FPGA_MASK)
{
case IFPGA_SC_ID_FPGA_XC4062:
printf("XC4062");
break;
case IFPGA_SC_ID_FPGA_XC4085:
printf("XC4085");
break;
default:
printf("unknown");
break;
}