Beispiel #1
0
/**
 * Print the values of all of the LPC47M10X2's configuration registers.
 *
 * NOTE: The LPC47M10X2 must be in config mode when this function is called.
 *
 * @param dev Pointer to structure describing a Super I/O device.
 */
static void dump_pnp_device(device_t dev)
{
    int i;
    print_debug("\n");

    for (i = 0; i <= LPC47M10X2_MAX_CONFIG_REGISTER; i++) {
        u8 register_value;

        if ((i & 0x0f) == 0) {
            print_debug_hex8(i);
            print_debug_char(':');
        }

        /*
         * Skip over 'register' that would cause exit from
         * configuration mode.
         */
        if (i == 0xaa)
            register_value = 0xaa;
        else
            register_value = pnp_read_config(dev, i);

        print_debug_char(' ');
        print_debug_hex8(register_value);
        if ((i & 0x0f) == 0x0f)
            print_debug("\n");
    }

    print_debug("\n");
}
Beispiel #2
0
static void print_debug_pci_dev(unsigned dev)
{
	print_debug("PCI: ");
	print_debug_hex8((dev >> 16) & 0xff);
	print_debug_char(':');
	print_debug_hex8((dev >> 11) & 0x1f);
	print_debug_char('.');
	print_debug_hex8((dev >> 8) & 7);
}
Beispiel #3
0
void dump_pci_device(unsigned dev)
{
	int i;
	print_debug_pci_dev(dev);
	print_debug("\n");

	for (i = 0; i <= 255; i++) {
		unsigned char val;
		if ((i & 0x0f) == 0) {
			print_debug_hex8(i);
			print_debug_char(':');
		}
		val = pci_read_config8(dev, i);
		print_debug_char(' ');
		print_debug_hex8(val);
		if ((i & 0x0f) == 0x0f) {
			print_debug("\n");
		}
	}
}
Beispiel #4
0
static void dump_spd_registers(void)
{
#if CONFIG_DEBUG_RAM_SETUP
	int i;
	print_debug("\n");
	for(i = 0; i < DIMM_SOCKETS; i++) {
		unsigned device;
		device = DIMM_SPD_BASE + i;
		if (device) {
			int j;
			print_debug("dimm: ");
			print_debug_hex8(i);
			print_debug(".0: ");
			print_debug_hex8(device);
			for(j = 0; j < 256; j++) {
				int status;
				unsigned char byte;
				if ((j & 0xf) == 0) {
					print_debug("\n");
					print_debug_hex8(j);
					print_debug(": ");
				}
				status = smbus_read_byte(device, j);
				if (status < 0) {
					print_debug("bad device\n");
					break;
				}
				byte = status & 0xff;
				print_debug_hex8(byte);
				print_debug_char(' ');
			}
			print_debug("\n");
		}
	}
#endif
}