Drop baud rate init to an arbitrary baud rate from Super I/O code.
See discussion at http://www.mail-archive.com/coreboot@coreboot.org/msg29394.html config->com1, devicetree.cb cleanup and init_uart8250() removal will follow once this patch is comitted Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Acked-by: Patrick Georgi <patrick@georgi-clan.de> Updated to drop com1, com2.... from config structure and devicetree.cb git-svn-id: svn://svn.coreboot.org/coreboot/trunk@6521 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
This commit is contained in:
		
				
					committed by
					
						 Stefan Reinauer
						Stefan Reinauer
					
				
			
			
				
	
			
			
			
						parent
						
							4fff74b69f
						
					
				
				
					commit
					13508b94cb
				
			| @@ -45,9 +45,6 @@ chip northbridge/intel/i855 | |||||||
|                 	        device pnp 2e.b on      #  HW Monitor |                 	        device pnp 2e.b on      #  HW Monitor | ||||||
|  					 io 0x60 = 0x290 |  					 io 0x60 = 0x290 | ||||||
| 				end | 				end | ||||||
| 				register "com1" = "{1}" |  | ||||||
| 			#	register "com1" = "{1, 0, 0x3f8, 4}" |  | ||||||
| 			#	register "lpt" = "{1}" |  | ||||||
|                 	end |                 	end | ||||||
| 		end | 		end | ||||||
| 	end | 	end | ||||||
|   | |||||||
| @@ -3,8 +3,5 @@ chip cpu/amd/sc520 | |||||||
| 		device pci 0.0 on end | 		device pci 0.0 on end | ||||||
| 		device pci 12.0 on end # enet | 		device pci 12.0 on end # enet | ||||||
| 		device pci 14.0 on end # 69000 | 		device pci 14.0 on end # 69000 | ||||||
| #		register "com1" = "{1}" |  | ||||||
| #		register "com1" = "{1, 0, 0x3f8, 4}" |  | ||||||
| 	end | 	end | ||||||
|  |  | ||||||
| end | end | ||||||
|   | |||||||
| @@ -36,8 +36,6 @@ chip northbridge/amd/gx1 | |||||||
|             device pnp 2e.8 on		# Power Management |             device pnp 2e.8 on		# Power Management | ||||||
|                io 0x60 = 0xe800 |                io 0x60 = 0xe800 | ||||||
|             end |             end | ||||||
|             register "com1" = "{115200}" |  | ||||||
|             register "com2" = "{38400}" |  | ||||||
|           end |           end | ||||||
|         device pci 12.1 off end		# SMI |         device pci 12.1 off end		# SMI | ||||||
|         device pci 12.2 on  end		# IDE |         device pci 12.2 on  end		# IDE | ||||||
|   | |||||||
| @@ -9,7 +9,5 @@ chip mainboard/emulation/qemu-x86 | |||||||
| 			register "ide1_enable" = "1" | 			register "ide1_enable" = "1" | ||||||
| 		end | 		end | ||||||
|  |  | ||||||
| #		register "com1" = "{1}" |  | ||||||
| #		register "com1" = "{1, 0, 0x3f8, 4}" |  | ||||||
| 	end | 	end | ||||||
| end | end | ||||||
|   | |||||||
| @@ -16,12 +16,10 @@ chip northbridge/amd/gx1 | |||||||
|               io 0x60 = 0x3f8 |               io 0x60 = 0x3f8 | ||||||
|               irq 0x70 = 4 |               irq 0x70 = 4 | ||||||
|             end |             end | ||||||
|             register "com1" = "{115200}" |  | ||||||
|             device pnp 3f0.3 on		# COM2 |             device pnp 3f0.3 on		# COM2 | ||||||
|               io 0x60 = 0x2f8 |               io 0x60 = 0x2f8 | ||||||
|               irq 0x70 = 3 |               irq 0x70 = 3 | ||||||
|             end |             end | ||||||
|             register "com2" = "{115200}" |  | ||||||
|             device pnp 3f0.4 on		# RTC |             device pnp 3f0.4 on		# RTC | ||||||
|               io 0x60 = 0x070 |               io 0x60 = 0x070 | ||||||
|               irq 0x70 = 8 |               irq 0x70 = 8 | ||||||
|   | |||||||
| @@ -19,12 +19,10 @@ chip northbridge/amd/gx1 | |||||||
|                io 0x60 = 0x3f8 |                io 0x60 = 0x3f8 | ||||||
|               irq 0x70 = 4 |               irq 0x70 = 4 | ||||||
|             end |             end | ||||||
|             register "com1" = "{115200}" |  | ||||||
|             device pnp 2e.3 on		# COM2 |             device pnp 2e.3 on		# COM2 | ||||||
|                io 0x60 = 0x2f8 |                io 0x60 = 0x2f8 | ||||||
|               irq 0x70 = 3 |               irq 0x70 = 3 | ||||||
|             end |             end | ||||||
|             register "com2" = "{115200}" |  | ||||||
|             device pnp 2e.4 off		# Reserved |             device pnp 2e.4 off		# Reserved | ||||||
|             end |             end | ||||||
|             device pnp 2e.5 on		# Keyboard |             device pnp 2e.5 on		# Keyboard | ||||||
|   | |||||||
| @@ -56,9 +56,6 @@ chip northbridge/amd/amdk8/root_complex | |||||||
| 							device pnp  2e.b on      # HW Monitor | 							device pnp  2e.b on      # HW Monitor | ||||||
| 								 io 0x60 = 0x290 | 								 io 0x60 = 0x290 | ||||||
| 							end | 							end | ||||||
| 							register "com1" = "{1}" |  | ||||||
| 						#	register "com1" = "{1, 0, 0x3f8, 4}" |  | ||||||
| 						#	register "lpt" = "{1}" |  | ||||||
| 						end | 						end | ||||||
| 					end | 					end | ||||||
| 					device pci 1.1 on end | 					device pci 1.1 on end | ||||||
|   | |||||||
| @@ -44,9 +44,6 @@ chip northbridge/intel/i855 | |||||||
|                 	 	        device pnp 2e.b on      #  HW Monitor |                 	 	        device pnp 2e.b on      #  HW Monitor | ||||||
|  						 io 0x60 = 0x290 |  						 io 0x60 = 0x290 | ||||||
| 					end | 					end | ||||||
| 					register "com1" = "{1}" |  | ||||||
| 				#	register "com1" = "{1, 0, 0x3f8, 4}" |  | ||||||
| 				#	register "lpt" = "{1}" |  | ||||||
| 				end | 				end | ||||||
|                 	end |                 	end | ||||||
| 		end | 		end | ||||||
|   | |||||||
| @@ -1,9 +1,6 @@ | |||||||
| chip cpu/amd/sc520 | chip cpu/amd/sc520 | ||||||
| 	device pci_domain 0 on | 	device pci_domain 0 on | ||||||
| 		device pci 0.0 on end | 		device pci 0.0 on end | ||||||
|  |  | ||||||
| #		register "com1" = "{1}" |  | ||||||
| #		register "com1" = "{1, 0, 0x3f8, 4}" |  | ||||||
| 	end | 	end | ||||||
|  |  | ||||||
| end | end | ||||||
|   | |||||||
| @@ -33,7 +33,6 @@ chip northbridge/via/vt8601 | |||||||
| 					  irq 0x70 = 1 | 					  irq 0x70 = 1 | ||||||
| 					  irq 0x72 = 12 | 					  irq 0x72 = 12 | ||||||
| 	      				end | 	      				end | ||||||
| 				register "com1" = "{CONFIG_TTYS0_BAUD}" |  | ||||||
| 				end | 				end | ||||||
| 				device pnp 2e.6 off end 	#  CIR | 				device pnp 2e.6 off end 	#  CIR | ||||||
| 				device pnp 2e.7 off end 	#  GAME_MIDI_GIPO1 | 				device pnp 2e.7 off end 	#  GAME_MIDI_GIPO1 | ||||||
|   | |||||||
| @@ -29,7 +29,7 @@ | |||||||
| extern struct chip_operations superio_fintek_f71805f_ops; | extern struct chip_operations superio_fintek_f71805f_ops; | ||||||
|  |  | ||||||
| struct superio_fintek_f71805f_config { | struct superio_fintek_f71805f_config { | ||||||
| 	struct uart8250 com1, com2; | 	 | ||||||
| }; | }; | ||||||
|  |  | ||||||
| #endif | #endif | ||||||
|   | |||||||
| @@ -40,23 +40,10 @@ static void pnp_exit_conf_state(device_t dev) | |||||||
|  |  | ||||||
| static void f71805f_init(device_t dev) | static void f71805f_init(device_t dev) | ||||||
| { | { | ||||||
| 	struct superio_fintek_f71805f_config *conf = dev->chip_info; |  | ||||||
| 	struct resource *res0; |  | ||||||
|  |  | ||||||
| 	if (!dev->enabled) | 	if (!dev->enabled) | ||||||
| 		return; | 		return; | ||||||
|  |  | ||||||
| 	switch(dev->path.pnp.device) { |  | ||||||
| 	/* TODO: Might potentially need code for HWM or FDC etc. */ | 	/* TODO: Might potentially need code for HWM or FDC etc. */ | ||||||
| 	case F71805F_SP1: |  | ||||||
| 		res0 = find_resource(dev, PNP_IDX_IO0); |  | ||||||
| 		init_uart8250(res0->base, &conf->com1); |  | ||||||
| 		break; |  | ||||||
| 	case F71805F_SP2: |  | ||||||
| 		res0 = find_resource(dev, PNP_IDX_IO0); |  | ||||||
| 		init_uart8250(res0->base, &conf->com2); |  | ||||||
| 		break; |  | ||||||
| 	} |  | ||||||
| } | } | ||||||
|  |  | ||||||
| static void f71805f_pnp_set_resources(device_t dev) | static void f71805f_pnp_set_resources(device_t dev) | ||||||
|   | |||||||
| @@ -27,7 +27,7 @@ | |||||||
| extern struct chip_operations superio_fintek_f71859_ops; | extern struct chip_operations superio_fintek_f71859_ops; | ||||||
|  |  | ||||||
| struct superio_fintek_f71859_config { | struct superio_fintek_f71859_config { | ||||||
| 	struct uart8250 com1, com2; | 	 | ||||||
| }; | }; | ||||||
|  |  | ||||||
| #endif | #endif | ||||||
|   | |||||||
| @@ -41,19 +41,10 @@ static void pnp_exit_conf_state(device_t dev) | |||||||
|  |  | ||||||
| static void f71859_init(device_t dev) | static void f71859_init(device_t dev) | ||||||
| { | { | ||||||
| 	struct superio_fintek_f71859_config *conf = dev->chip_info; |  | ||||||
| 	struct resource *res0; |  | ||||||
|  |  | ||||||
| 	if (!dev->enabled) | 	if (!dev->enabled) | ||||||
| 		return; | 		return; | ||||||
|  |  | ||||||
| 	switch(dev->path.pnp.device) { |  | ||||||
| 	/* TODO: Might potentially need code for HWM or FDC etc. */ | 	/* TODO: Might potentially need code for HWM or FDC etc. */ | ||||||
| 	case F71859_SP1: |  | ||||||
| 		res0 = find_resource(dev, PNP_IDX_IO0); |  | ||||||
| 		init_uart8250(res0->base, &conf->com1); |  | ||||||
| 		break; |  | ||||||
| 	} |  | ||||||
| } | } | ||||||
|  |  | ||||||
| static void f71859_pnp_set_resources(device_t dev) | static void f71859_pnp_set_resources(device_t dev) | ||||||
|   | |||||||
| @@ -28,7 +28,7 @@ | |||||||
| extern struct chip_operations superio_fintek_f71863fg_ops; | extern struct chip_operations superio_fintek_f71863fg_ops; | ||||||
|  |  | ||||||
| struct superio_fintek_f71863fg_config { | struct superio_fintek_f71863fg_config { | ||||||
| 	struct uart8250 com1, com2; | 	 | ||||||
| 	struct pc_keyboard keyboard; | 	struct pc_keyboard keyboard; | ||||||
| }; | }; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -48,14 +48,6 @@ static void f71863fg_init(device_t dev) | |||||||
|  |  | ||||||
| 	switch(dev->path.pnp.device) { | 	switch(dev->path.pnp.device) { | ||||||
| 	/* TODO: Might potentially need code for HWM or FDC etc. */ | 	/* TODO: Might potentially need code for HWM or FDC etc. */ | ||||||
| 	case F71863FG_SP1: |  | ||||||
| 		res0 = find_resource(dev, PNP_IDX_IO0); |  | ||||||
| 		init_uart8250(res0->base, &conf->com1); |  | ||||||
| 		break; |  | ||||||
| 	case F71863FG_SP2: |  | ||||||
| 		res0 = find_resource(dev, PNP_IDX_IO0); |  | ||||||
| 		init_uart8250(res0->base, &conf->com2); |  | ||||||
| 		break; |  | ||||||
| 	case F71863FG_KBC: | 	case F71863FG_KBC: | ||||||
| 		res0 = find_resource(dev, PNP_IDX_IO0); | 		res0 = find_resource(dev, PNP_IDX_IO0); | ||||||
| 		pc_keyboard_init(&conf->keyboard); | 		pc_keyboard_init(&conf->keyboard); | ||||||
|   | |||||||
| @@ -27,7 +27,7 @@ | |||||||
| extern struct chip_operations superio_fintek_f71872_ops; | extern struct chip_operations superio_fintek_f71872_ops; | ||||||
|  |  | ||||||
| struct superio_fintek_f71872_config { | struct superio_fintek_f71872_config { | ||||||
| 	struct uart8250 com1, com2; | 	 | ||||||
| 	struct pc_keyboard keyboard; | 	struct pc_keyboard keyboard; | ||||||
| }; | }; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -40,21 +40,12 @@ static void pnp_exit_conf_state(device_t dev) | |||||||
| static void f71872_init(device_t dev) | static void f71872_init(device_t dev) | ||||||
| { | { | ||||||
| 	struct superio_fintek_f71872_config *conf = dev->chip_info; | 	struct superio_fintek_f71872_config *conf = dev->chip_info; | ||||||
| 	struct resource *res0; |  | ||||||
|  |  | ||||||
| 	if (!dev->enabled) | 	if (!dev->enabled) | ||||||
| 		return; | 		return; | ||||||
|  |  | ||||||
| 	switch(dev->path.pnp.device) { | 	switch(dev->path.pnp.device) { | ||||||
| 	/* TODO: Might potentially need code for HWM or FDC etc. */ | 	/* TODO: Might potentially need code for HWM or FDC etc. */ | ||||||
| 	case F71872_SP1: |  | ||||||
| 		res0 = find_resource(dev, PNP_IDX_IO0); |  | ||||||
| 		init_uart8250(res0->base, &conf->com1); |  | ||||||
| 		break; |  | ||||||
| 	case F71872_SP2: |  | ||||||
| 		res0 = find_resource(dev, PNP_IDX_IO0); |  | ||||||
| 		init_uart8250(res0->base, &conf->com2); |  | ||||||
| 		break; |  | ||||||
| 	case F71872_KBC: | 	case F71872_KBC: | ||||||
| 		pc_keyboard_init(&conf->keyboard); | 		pc_keyboard_init(&conf->keyboard); | ||||||
| 		break; | 		break; | ||||||
|   | |||||||
| @@ -28,7 +28,7 @@ | |||||||
| extern struct chip_operations superio_fintek_f71889_ops; | extern struct chip_operations superio_fintek_f71889_ops; | ||||||
|  |  | ||||||
| struct superio_fintek_f71889_config { | struct superio_fintek_f71889_config { | ||||||
| 	struct uart8250 com1, com2; | 	 | ||||||
| 	struct pc_keyboard keyboard; | 	struct pc_keyboard keyboard; | ||||||
| }; | }; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -41,21 +41,12 @@ static void pnp_exit_conf_state(device_t dev) | |||||||
| static void f71889_init(device_t dev) | static void f71889_init(device_t dev) | ||||||
| { | { | ||||||
| 	struct superio_fintek_f71889_config *conf = dev->chip_info; | 	struct superio_fintek_f71889_config *conf = dev->chip_info; | ||||||
| 	struct resource *res0; |  | ||||||
|  |  | ||||||
| 	if (!dev->enabled) | 	if (!dev->enabled) | ||||||
| 		return; | 		return; | ||||||
|  |  | ||||||
| 	switch (dev->path.pnp.device) { | 	switch (dev->path.pnp.device) { | ||||||
| 	/* TODO: Might potentially need code for HWM or FDC etc. */ | 	/* TODO: Might potentially need code for HWM or FDC etc. */ | ||||||
| 	case F71889_SP1: |  | ||||||
| 		res0 = find_resource(dev, PNP_IDX_IO0); |  | ||||||
| 		init_uart8250(res0->base, &conf->com1); |  | ||||||
| 		break; |  | ||||||
| 	case F71889_SP2: |  | ||||||
| 		res0 = find_resource(dev, PNP_IDX_IO0); |  | ||||||
| 		init_uart8250(res0->base, &conf->com2); |  | ||||||
| 		break; |  | ||||||
| 	case F71889_KBC: | 	case F71889_KBC: | ||||||
| 		pc_keyboard_init(&conf->keyboard); | 		pc_keyboard_init(&conf->keyboard); | ||||||
| 		break; | 		break; | ||||||
|   | |||||||
| @@ -29,7 +29,7 @@ | |||||||
| extern struct chip_operations superio_fintek_f81865f_ops; | extern struct chip_operations superio_fintek_f81865f_ops; | ||||||
|  |  | ||||||
| struct superio_fintek_f81865f_config { | struct superio_fintek_f81865f_config { | ||||||
| 	struct uart8250 com1, com2; | 	 | ||||||
| 	struct pc_keyboard keyboard; | 	struct pc_keyboard keyboard; | ||||||
| }; | }; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -40,21 +40,12 @@ static void pnp_exit_conf_state(device_t dev) | |||||||
| static void f81865f_init(device_t dev) | static void f81865f_init(device_t dev) | ||||||
| { | { | ||||||
| 	struct superio_fintek_f81865f_config *conf = dev->chip_info; | 	struct superio_fintek_f81865f_config *conf = dev->chip_info; | ||||||
| 	struct resource *res0; |  | ||||||
|  |  | ||||||
| 	if (!dev->enabled) | 	if (!dev->enabled) | ||||||
| 		return; | 		return; | ||||||
|  |  | ||||||
| 	switch (dev->path.pnp.device) { | 	switch (dev->path.pnp.device) { | ||||||
| 	/* TODO: Might potentially need code for HWM or FDC etc. */ | 	/* TODO: Might potentially need code for HWM or FDC etc. */ | ||||||
| 	case F81865F_SP1: |  | ||||||
| 		res0 = find_resource(dev, PNP_IDX_IO0); |  | ||||||
| 		init_uart8250(res0->base, &conf->com1); |  | ||||||
| 		break; |  | ||||||
| 	case F81865F_SP2: |  | ||||||
| 		res0 = find_resource(dev, PNP_IDX_IO0); |  | ||||||
| 		init_uart8250(res0->base, &conf->com2); |  | ||||||
| 		break; |  | ||||||
| 	case F81865F_KBC: | 	case F81865F_KBC: | ||||||
| 		pc_keyboard_init(&conf->keyboard); | 		pc_keyboard_init(&conf->keyboard); | ||||||
| 		break; | 		break; | ||||||
|   | |||||||
| @@ -27,7 +27,6 @@ | |||||||
| extern struct chip_operations superio_intel_i3100_ops; | extern struct chip_operations superio_intel_i3100_ops; | ||||||
|  |  | ||||||
| struct superio_intel_i3100_config { | struct superio_intel_i3100_config { | ||||||
| 	struct uart8250 com1, com2; |  | ||||||
| }; | }; | ||||||
|  |  | ||||||
| #endif | #endif | ||||||
|   | |||||||
| @@ -40,24 +40,8 @@ static void pnp_exit_ext_func_mode(device_t dev) | |||||||
|  |  | ||||||
| static void i3100_init(device_t dev) | static void i3100_init(device_t dev) | ||||||
| { | { | ||||||
| 	struct superio_intel_i3100_config *conf; |  | ||||||
| 	struct resource *res0; |  | ||||||
|  |  | ||||||
| 	if (!dev->enabled) | 	if (!dev->enabled) | ||||||
| 		return; | 		return; | ||||||
|  |  | ||||||
| 	conf = dev->chip_info; |  | ||||||
|  |  | ||||||
| 	switch (dev->path.pnp.device) { |  | ||||||
| 	case I3100_SP1: |  | ||||||
| 		res0 = find_resource(dev, PNP_IDX_IO0); |  | ||||||
| 		init_uart8250(res0->base, &conf->com1); |  | ||||||
| 		break; |  | ||||||
| 	case I3100_SP2: |  | ||||||
| 		res0 = find_resource(dev, PNP_IDX_IO0); |  | ||||||
| 		init_uart8250(res0->base, &conf->com2); |  | ||||||
| 		break; |  | ||||||
| 	} |  | ||||||
| } | } | ||||||
|  |  | ||||||
| static void i3100_pnp_set_resources(device_t dev) | static void i3100_pnp_set_resources(device_t dev) | ||||||
|   | |||||||
| @@ -29,7 +29,7 @@ | |||||||
| extern struct chip_operations superio_ite_it8661f_ops; | extern struct chip_operations superio_ite_it8661f_ops; | ||||||
|  |  | ||||||
| struct superio_ite_it8661f_config { | struct superio_ite_it8661f_config { | ||||||
| 	struct uart8250 com1, com2; | 	 | ||||||
| }; | }; | ||||||
|  |  | ||||||
| #endif | #endif | ||||||
|   | |||||||
| @@ -29,23 +29,12 @@ | |||||||
|  |  | ||||||
| static void init(device_t dev) | static void init(device_t dev) | ||||||
| { | { | ||||||
| 	struct superio_ite_it8661f_config *conf = dev->chip_info; |  | ||||||
| 	struct resource *res0; |  | ||||||
|  |  | ||||||
| 	if (!dev->enabled) | 	if (!dev->enabled) | ||||||
| 		return; | 		return; | ||||||
|  |  | ||||||
| 	switch (dev->path.pnp.device) { | 	switch (dev->path.pnp.device) { | ||||||
| 	case IT8661F_FDC: /* TODO. */ | 	case IT8661F_FDC: /* TODO. */ | ||||||
| 		break; | 		break; | ||||||
| 	case IT8661F_SP1: |  | ||||||
| 		res0 = find_resource(dev, PNP_IDX_IO0); |  | ||||||
| 		init_uart8250(res0->base, &conf->com1); |  | ||||||
| 		break; |  | ||||||
| 	case IT8661F_SP2: |  | ||||||
| 		res0 = find_resource(dev, PNP_IDX_IO0); |  | ||||||
| 		init_uart8250(res0->base, &conf->com2); |  | ||||||
| 		break; |  | ||||||
| 	case IT8661F_PP: /* TODO. */ | 	case IT8661F_PP: /* TODO. */ | ||||||
| 		break; | 		break; | ||||||
| 	case IT8661F_IR: /* TODO. */ | 	case IT8661F_IR: /* TODO. */ | ||||||
|   | |||||||
| @@ -28,7 +28,7 @@ | |||||||
| extern struct chip_operations superio_ite_it8671f_ops; | extern struct chip_operations superio_ite_it8671f_ops; | ||||||
|  |  | ||||||
| struct superio_ite_it8671f_config { | struct superio_ite_it8671f_config { | ||||||
| 	struct uart8250 com1, com2; | 	 | ||||||
| 	struct pc_keyboard keyboard; | 	struct pc_keyboard keyboard; | ||||||
| }; | }; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -29,7 +29,6 @@ | |||||||
| static void init(device_t dev) | static void init(device_t dev) | ||||||
| { | { | ||||||
| 	struct superio_ite_it8671f_config *conf = dev->chip_info; | 	struct superio_ite_it8671f_config *conf = dev->chip_info; | ||||||
| 	struct resource *res0; |  | ||||||
|  |  | ||||||
| 	if (!dev->enabled) | 	if (!dev->enabled) | ||||||
| 		return; | 		return; | ||||||
| @@ -37,14 +36,6 @@ static void init(device_t dev) | |||||||
| 	switch (dev->path.pnp.device) { | 	switch (dev->path.pnp.device) { | ||||||
| 	case IT8671F_FDC: /* TODO. */ | 	case IT8671F_FDC: /* TODO. */ | ||||||
| 		break; | 		break; | ||||||
| 	case IT8671F_SP1: |  | ||||||
| 		res0 = find_resource(dev, PNP_IDX_IO0); |  | ||||||
| 		init_uart8250(res0->base, &conf->com1); |  | ||||||
| 		break; |  | ||||||
| 	case IT8671F_SP2: |  | ||||||
| 		res0 = find_resource(dev, PNP_IDX_IO0); |  | ||||||
| 		init_uart8250(res0->base, &conf->com2); |  | ||||||
| 		break; |  | ||||||
| 	case IT8671F_PP: /* TODO. */ | 	case IT8671F_PP: /* TODO. */ | ||||||
| 		break; | 		break; | ||||||
| 	case IT8671F_KBCK: | 	case IT8671F_KBCK: | ||||||
|   | |||||||
| @@ -28,7 +28,7 @@ | |||||||
| extern struct chip_operations superio_ite_it8673f_ops; | extern struct chip_operations superio_ite_it8673f_ops; | ||||||
|  |  | ||||||
| struct superio_ite_it8673f_config { | struct superio_ite_it8673f_config { | ||||||
| 	struct uart8250 com1, com2; | 	 | ||||||
| 	struct pc_keyboard keyboard; | 	struct pc_keyboard keyboard; | ||||||
| }; | }; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -29,7 +29,6 @@ | |||||||
| static void init(device_t dev) | static void init(device_t dev) | ||||||
| { | { | ||||||
| 	struct superio_ite_it8673f_config *conf = dev->chip_info; | 	struct superio_ite_it8673f_config *conf = dev->chip_info; | ||||||
| 	struct resource *res0; |  | ||||||
|  |  | ||||||
| 	if (!dev->enabled) | 	if (!dev->enabled) | ||||||
| 		return; | 		return; | ||||||
| @@ -37,14 +36,6 @@ static void init(device_t dev) | |||||||
| 	switch (dev->path.pnp.device) { | 	switch (dev->path.pnp.device) { | ||||||
| 	case IT8673F_FDC: /* TODO. */ | 	case IT8673F_FDC: /* TODO. */ | ||||||
| 		break; | 		break; | ||||||
| 	case IT8673F_SP1: |  | ||||||
| 		res0 = find_resource(dev, PNP_IDX_IO0); |  | ||||||
| 		init_uart8250(res0->base, &conf->com1); |  | ||||||
| 		break; |  | ||||||
| 	case IT8673F_SP2: |  | ||||||
| 		res0 = find_resource(dev, PNP_IDX_IO0); |  | ||||||
| 		init_uart8250(res0->base, &conf->com2); |  | ||||||
| 		break; |  | ||||||
| 	case IT8673F_PP: /* TODO. */ | 	case IT8673F_PP: /* TODO. */ | ||||||
| 		break; | 		break; | ||||||
| 	case IT8673F_FAN: /* TODO. */ | 	case IT8673F_FAN: /* TODO. */ | ||||||
|   | |||||||
| @@ -29,7 +29,7 @@ | |||||||
| extern struct chip_operations superio_ite_it8705f_ops; | extern struct chip_operations superio_ite_it8705f_ops; | ||||||
|  |  | ||||||
| struct superio_ite_it8705f_config { | struct superio_ite_it8705f_config { | ||||||
| 	struct uart8250 com1, com2; | 	 | ||||||
| }; | }; | ||||||
|  |  | ||||||
| #endif | #endif | ||||||
|   | |||||||
| @@ -28,7 +28,6 @@ | |||||||
| static void init(device_t dev) | static void init(device_t dev) | ||||||
| { | { | ||||||
| 	struct superio_ite_it8705f_config *conf = dev->chip_info; | 	struct superio_ite_it8705f_config *conf = dev->chip_info; | ||||||
| 	struct resource *res0; |  | ||||||
|  |  | ||||||
| 	if (!dev->enabled) | 	if (!dev->enabled) | ||||||
| 		return; | 		return; | ||||||
| @@ -36,14 +35,6 @@ static void init(device_t dev) | |||||||
| 	switch (dev->path.pnp.device) { | 	switch (dev->path.pnp.device) { | ||||||
| 	case IT8705F_FDC: /* TODO. */ | 	case IT8705F_FDC: /* TODO. */ | ||||||
| 		break; | 		break; | ||||||
| 	case IT8705F_SP1: |  | ||||||
| 		res0 = find_resource(dev, PNP_IDX_IO0); |  | ||||||
| 		init_uart8250(res0->base, &conf->com1); |  | ||||||
| 		break; |  | ||||||
| 	case IT8705F_SP2: |  | ||||||
| 		res0 = find_resource(dev, PNP_IDX_IO0); |  | ||||||
| 		init_uart8250(res0->base, &conf->com2); |  | ||||||
| 		break; |  | ||||||
| 	case IT8705F_PP: /* TODO. */ | 	case IT8705F_PP: /* TODO. */ | ||||||
| 		break; | 		break; | ||||||
| 	case IT8705F_EC: /* TODO. */ | 	case IT8705F_EC: /* TODO. */ | ||||||
|   | |||||||
| @@ -28,7 +28,7 @@ | |||||||
| extern struct chip_operations superio_ite_it8712f_ops; | extern struct chip_operations superio_ite_it8712f_ops; | ||||||
|  |  | ||||||
| struct superio_ite_it8712f_config { | struct superio_ite_it8712f_config { | ||||||
| 	struct uart8250 com1, com2; | 	 | ||||||
| 	struct pc_keyboard keyboard; | 	struct pc_keyboard keyboard; | ||||||
| }; | }; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -46,7 +46,6 @@ static void pnp_exit_ext_func_mode(device_t dev) | |||||||
| static void it8712f_init(device_t dev) | static void it8712f_init(device_t dev) | ||||||
| { | { | ||||||
| 	struct superio_ite_it8712f_config *conf = dev->chip_info; | 	struct superio_ite_it8712f_config *conf = dev->chip_info; | ||||||
| 	struct resource *res0; |  | ||||||
|  |  | ||||||
| 	if (!dev->enabled) | 	if (!dev->enabled) | ||||||
| 		return; | 		return; | ||||||
| @@ -54,14 +53,6 @@ static void it8712f_init(device_t dev) | |||||||
| 	switch (dev->path.pnp.device) { | 	switch (dev->path.pnp.device) { | ||||||
| 	case IT8712F_FDC: /* TODO. */ | 	case IT8712F_FDC: /* TODO. */ | ||||||
| 		break; | 		break; | ||||||
| 	case IT8712F_SP1: |  | ||||||
| 		res0 = find_resource(dev, PNP_IDX_IO0); |  | ||||||
| 		init_uart8250(res0->base, &conf->com1); |  | ||||||
| 		break; |  | ||||||
| 	case IT8712F_SP2: |  | ||||||
| 		res0 = find_resource(dev, PNP_IDX_IO0); |  | ||||||
| 		init_uart8250(res0->base, &conf->com2); |  | ||||||
| 		break; |  | ||||||
| 	case IT8712F_PP: /* TODO. */ | 	case IT8712F_PP: /* TODO. */ | ||||||
| 		break; | 		break; | ||||||
| 	case IT8712F_EC: /* TODO. */ | 	case IT8712F_EC: /* TODO. */ | ||||||
|   | |||||||
| @@ -28,7 +28,7 @@ | |||||||
| extern struct chip_operations superio_ite_it8716f_ops; | extern struct chip_operations superio_ite_it8716f_ops; | ||||||
|  |  | ||||||
| struct superio_ite_it8716f_config { | struct superio_ite_it8716f_config { | ||||||
| 	struct uart8250 com1, com2; | 	 | ||||||
| 	struct pc_keyboard keyboard; | 	struct pc_keyboard keyboard; | ||||||
| }; | }; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -85,14 +85,6 @@ static void it8716f_init(device_t dev) | |||||||
|  |  | ||||||
| 	/* TODO: FDC, PP, KBCM, MIDI, GAME, IR. */ | 	/* TODO: FDC, PP, KBCM, MIDI, GAME, IR. */ | ||||||
| 	switch (dev->path.pnp.device) { | 	switch (dev->path.pnp.device) { | ||||||
| 	case IT8716F_SP1: |  | ||||||
| 		res0 = find_resource(dev, PNP_IDX_IO0); |  | ||||||
| 		init_uart8250(res0->base, &conf->com1); |  | ||||||
| 		break; |  | ||||||
| 	case IT8716F_SP2: |  | ||||||
| 		res0 = find_resource(dev, PNP_IDX_IO0); |  | ||||||
| 		init_uart8250(res0->base, &conf->com2); |  | ||||||
| 		break; |  | ||||||
| 	case IT8716F_EC: | 	case IT8716F_EC: | ||||||
| 		res0 = find_resource(dev, PNP_IDX_IO0); | 		res0 = find_resource(dev, PNP_IDX_IO0); | ||||||
| #define EC_INDEX_PORT 5 | #define EC_INDEX_PORT 5 | ||||||
|   | |||||||
| @@ -28,7 +28,7 @@ | |||||||
| extern struct chip_operations superio_ite_it8718f_ops; | extern struct chip_operations superio_ite_it8718f_ops; | ||||||
|  |  | ||||||
| struct superio_ite_it8718f_config { | struct superio_ite_it8718f_config { | ||||||
| 	struct uart8250 com1, com2; | 	 | ||||||
| 	struct pc_keyboard keyboard; | 	struct pc_keyboard keyboard; | ||||||
| }; | }; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -29,7 +29,6 @@ | |||||||
| static void init(device_t dev) | static void init(device_t dev) | ||||||
| { | { | ||||||
| 	struct superio_ite_it8718f_config *conf = dev->chip_info; | 	struct superio_ite_it8718f_config *conf = dev->chip_info; | ||||||
| 	struct resource *res0; |  | ||||||
|  |  | ||||||
| 	if (!dev->enabled) | 	if (!dev->enabled) | ||||||
| 		return; | 		return; | ||||||
| @@ -37,14 +36,6 @@ static void init(device_t dev) | |||||||
| 	switch (dev->path.pnp.device) { | 	switch (dev->path.pnp.device) { | ||||||
| 	case IT8718F_FDC: /* TODO. */ | 	case IT8718F_FDC: /* TODO. */ | ||||||
| 		break; | 		break; | ||||||
| 	case IT8718F_SP1: |  | ||||||
| 		res0 = find_resource(dev, PNP_IDX_IO0); |  | ||||||
| 		init_uart8250(res0->base, &conf->com1); |  | ||||||
| 		break; |  | ||||||
| 	case IT8718F_SP2: |  | ||||||
| 		res0 = find_resource(dev, PNP_IDX_IO0); |  | ||||||
| 		init_uart8250(res0->base, &conf->com2); |  | ||||||
| 		break; |  | ||||||
| 	case IT8718F_PP: /* TODO. */ | 	case IT8718F_PP: /* TODO. */ | ||||||
| 		break; | 		break; | ||||||
| 	case IT8718F_EC: /* TODO. */ | 	case IT8718F_EC: /* TODO. */ | ||||||
|   | |||||||
| @@ -29,7 +29,7 @@ extern struct chip_operations superio_nsc_pc8374_ops; | |||||||
| #include <uart8250.h> | #include <uart8250.h> | ||||||
|  |  | ||||||
| struct superio_nsc_pc8374_config { | struct superio_nsc_pc8374_config { | ||||||
| 	struct uart8250 com1, com2; | 	 | ||||||
| 	struct pc_keyboard keyboard; | 	struct pc_keyboard keyboard; | ||||||
| }; | }; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -34,20 +34,11 @@ | |||||||
| static void init(device_t dev) | static void init(device_t dev) | ||||||
| { | { | ||||||
| 	struct superio_nsc_pc8374_config *conf = dev->chip_info; | 	struct superio_nsc_pc8374_config *conf = dev->chip_info; | ||||||
| 	struct resource *res0; |  | ||||||
|  |  | ||||||
| 	if (!dev->enabled) | 	if (!dev->enabled) | ||||||
| 		return; | 		return; | ||||||
|  |  | ||||||
| 	switch(dev->path.pnp.device) { | 	switch(dev->path.pnp.device) { | ||||||
| 	case PC8374_SP1: |  | ||||||
| 		res0 = find_resource(dev, PNP_IDX_IO0); |  | ||||||
| 		init_uart8250(res0->base, &conf->com1); |  | ||||||
| 		break; |  | ||||||
| 	case PC8374_SP2: |  | ||||||
| 		res0 = find_resource(dev, PNP_IDX_IO0); |  | ||||||
| 		init_uart8250(res0->base, &conf->com2); |  | ||||||
| 		break; |  | ||||||
| 	case PC8374_KBCK: | 	case PC8374_KBCK: | ||||||
| 		pc_keyboard_init(&conf->keyboard); | 		pc_keyboard_init(&conf->keyboard); | ||||||
| 		break; | 		break; | ||||||
|   | |||||||
| @@ -27,7 +27,7 @@ | |||||||
| extern struct chip_operations superio_nsc_pc87309_ops; | extern struct chip_operations superio_nsc_pc87309_ops; | ||||||
|  |  | ||||||
| struct superio_nsc_pc87309_config { | struct superio_nsc_pc87309_config { | ||||||
| 	struct uart8250 com1, com2; | 	 | ||||||
| 	struct pc_keyboard keyboard; | 	struct pc_keyboard keyboard; | ||||||
| }; | }; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -30,20 +30,11 @@ | |||||||
| static void init(device_t dev) | static void init(device_t dev) | ||||||
| { | { | ||||||
| 	struct superio_nsc_pc87309_config *conf = dev->chip_info; | 	struct superio_nsc_pc87309_config *conf = dev->chip_info; | ||||||
| 	struct resource *res0; |  | ||||||
|  |  | ||||||
| 	if (!dev->enabled) | 	if (!dev->enabled) | ||||||
| 		return; | 		return; | ||||||
|  |  | ||||||
| 	switch (dev->path.pnp.device) { | 	switch (dev->path.pnp.device) { | ||||||
| 	case PC87309_SP1: |  | ||||||
| 		res0 = find_resource(dev, PNP_IDX_IO0); |  | ||||||
| 		init_uart8250(res0->base, &conf->com1); |  | ||||||
| 		break; |  | ||||||
| 	case PC87309_SP2: |  | ||||||
| 		res0 = find_resource(dev, PNP_IDX_IO0); |  | ||||||
| 		init_uart8250(res0->base, &conf->com2); |  | ||||||
| 		break; |  | ||||||
| 	case PC87309_KBCK: | 	case PC87309_KBCK: | ||||||
| 		pc_keyboard_init(&conf->keyboard); | 		pc_keyboard_init(&conf->keyboard); | ||||||
| 		break; | 		break; | ||||||
|   | |||||||
| @@ -29,7 +29,7 @@ extern struct chip_operations superio_nsc_pc87351_ops; | |||||||
| #include <uart8250.h> | #include <uart8250.h> | ||||||
|  |  | ||||||
| struct superio_nsc_pc87351_config { | struct superio_nsc_pc87351_config { | ||||||
| 	struct uart8250 com1, com2; | 	 | ||||||
| 	struct pc_keyboard keyboard; | 	struct pc_keyboard keyboard; | ||||||
| }; | }; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -34,20 +34,11 @@ | |||||||
| static void init(device_t dev) | static void init(device_t dev) | ||||||
| { | { | ||||||
| 	struct superio_nsc_pc87351_config *conf = dev->chip_info; | 	struct superio_nsc_pc87351_config *conf = dev->chip_info; | ||||||
| 	struct resource *res0; |  | ||||||
|  |  | ||||||
| 	if (!dev->enabled) | 	if (!dev->enabled) | ||||||
| 		return; | 		return; | ||||||
|  |  | ||||||
| 	switch(dev->path.pnp.device) { | 	switch(dev->path.pnp.device) { | ||||||
| 	case PC87351_SP1: |  | ||||||
| 		res0 = find_resource(dev, PNP_IDX_IO0); |  | ||||||
| 		init_uart8250(res0->base, &conf->com1); |  | ||||||
| 		break; |  | ||||||
| 	case PC87351_SP2: |  | ||||||
| 		res0 = find_resource(dev, PNP_IDX_IO0); |  | ||||||
| 		init_uart8250(res0->base, &conf->com2); |  | ||||||
| 		break; |  | ||||||
| 	case PC87351_KBCK: | 	case PC87351_KBCK: | ||||||
| 		pc_keyboard_init(&conf->keyboard); | 		pc_keyboard_init(&conf->keyboard); | ||||||
| 		break; | 		break; | ||||||
|   | |||||||
| @@ -29,7 +29,7 @@ extern struct chip_operations superio_nsc_pc87360_ops; | |||||||
| #include <uart8250.h> | #include <uart8250.h> | ||||||
|  |  | ||||||
| struct superio_nsc_pc87360_config { | struct superio_nsc_pc87360_config { | ||||||
| 	struct uart8250 com1, com2; | 	 | ||||||
| 	struct pc_keyboard keyboard; | 	struct pc_keyboard keyboard; | ||||||
| }; | }; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -34,20 +34,11 @@ | |||||||
| static void init(device_t dev) | static void init(device_t dev) | ||||||
| { | { | ||||||
| 	struct superio_nsc_pc87360_config *conf = dev->chip_info; | 	struct superio_nsc_pc87360_config *conf = dev->chip_info; | ||||||
| 	struct resource *res0; |  | ||||||
|  |  | ||||||
| 	if (!dev->enabled) | 	if (!dev->enabled) | ||||||
| 		return; | 		return; | ||||||
|  |  | ||||||
| 	switch(dev->path.pnp.device) { | 	switch(dev->path.pnp.device) { | ||||||
| 	case PC87360_SP1: |  | ||||||
| 		res0 = find_resource(dev, PNP_IDX_IO0); |  | ||||||
| 		init_uart8250(res0->base, &conf->com1); |  | ||||||
| 		break; |  | ||||||
| 	case PC87360_SP2: |  | ||||||
| 		res0 = find_resource(dev, PNP_IDX_IO0); |  | ||||||
| 		init_uart8250(res0->base, &conf->com2); |  | ||||||
| 		break; |  | ||||||
| 	case PC87360_KBCK: | 	case PC87360_KBCK: | ||||||
| 		pc_keyboard_init(&conf->keyboard); | 		pc_keyboard_init(&conf->keyboard); | ||||||
| 		break; | 		break; | ||||||
|   | |||||||
| @@ -28,7 +28,7 @@ extern struct chip_operations superio_nsc_pc87366_ops; | |||||||
| #include <uart8250.h> | #include <uart8250.h> | ||||||
|  |  | ||||||
| struct superio_nsc_pc87366_config { | struct superio_nsc_pc87366_config { | ||||||
| 	struct uart8250 com1, com2; | 	 | ||||||
| 	struct pc_keyboard keyboard; | 	struct pc_keyboard keyboard; | ||||||
| }; | }; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -34,20 +34,11 @@ | |||||||
| static void init(device_t dev) | static void init(device_t dev) | ||||||
| { | { | ||||||
| 	struct superio_nsc_pc87366_config *conf = dev->chip_info; | 	struct superio_nsc_pc87366_config *conf = dev->chip_info; | ||||||
| 	struct resource *res0; |  | ||||||
|  |  | ||||||
| 	if (!dev->enabled) | 	if (!dev->enabled) | ||||||
| 		return; | 		return; | ||||||
|  |  | ||||||
| 	switch(dev->path.pnp.device) { | 	switch(dev->path.pnp.device) { | ||||||
| 	case PC87366_SP1: |  | ||||||
| 		res0 = find_resource(dev, PNP_IDX_IO0); |  | ||||||
| 		init_uart8250(res0->base, &conf->com1); |  | ||||||
| 		break; |  | ||||||
| 	case PC87366_SP2: |  | ||||||
| 		res0 = find_resource(dev, PNP_IDX_IO0); |  | ||||||
| 		init_uart8250(res0->base, &conf->com2); |  | ||||||
| 		break; |  | ||||||
| 	case PC87366_KBCK: | 	case PC87366_KBCK: | ||||||
| 		pc_keyboard_init(&conf->keyboard); | 		pc_keyboard_init(&conf->keyboard); | ||||||
| 		break; | 		break; | ||||||
|   | |||||||
| @@ -25,7 +25,7 @@ | |||||||
| extern struct chip_operations superio_nsc_pc87382_ops; | extern struct chip_operations superio_nsc_pc87382_ops; | ||||||
|  |  | ||||||
| struct superio_nsc_pc87382_config { | struct superio_nsc_pc87382_config { | ||||||
| 	struct uart8250 com1, com2; | 	 | ||||||
| }; | }; | ||||||
|  |  | ||||||
| #endif | #endif | ||||||
|   | |||||||
| @@ -33,21 +33,11 @@ | |||||||
| static void init(device_t dev) | static void init(device_t dev) | ||||||
| { | { | ||||||
| 	struct superio_nsc_pc87382_config *conf = dev->chip_info; | 	struct superio_nsc_pc87382_config *conf = dev->chip_info; | ||||||
| 	struct resource *res0; |  | ||||||
|  |  | ||||||
| 	if (!dev->enabled) | 	if (!dev->enabled) | ||||||
| 		return; | 		return; | ||||||
|  |  | ||||||
| 	switch(dev->path.pnp.device) { | 	switch(dev->path.pnp.device) { | ||||||
| 	case PC87382_SP1: |  | ||||||
| 		res0 = find_resource(dev, PNP_IDX_IO0); |  | ||||||
| 		init_uart8250(res0->base, &conf->com1); |  | ||||||
| 		break; |  | ||||||
| 	case PC87382_IR: |  | ||||||
| 		res0 = find_resource(dev, PNP_IDX_IO0); |  | ||||||
| 		init_uart8250(res0->base, &conf->com2); |  | ||||||
| 		break; |  | ||||||
|  |  | ||||||
| 	case PC87382_DOCK: | 	case PC87382_DOCK: | ||||||
| 		break; | 		break; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -25,7 +25,7 @@ | |||||||
| extern struct chip_operations superio_nsc_pc87384_ops; | extern struct chip_operations superio_nsc_pc87384_ops; | ||||||
|  |  | ||||||
| struct superio_nsc_pc87384_config { | struct superio_nsc_pc87384_config { | ||||||
| 	struct uart8250 com1, com2; | 	 | ||||||
| }; | }; | ||||||
|  |  | ||||||
| #endif | #endif | ||||||
|   | |||||||
| @@ -33,21 +33,11 @@ | |||||||
| static void init(device_t dev) | static void init(device_t dev) | ||||||
| { | { | ||||||
| 	struct superio_nsc_pc87384_config *conf = dev->chip_info; | 	struct superio_nsc_pc87384_config *conf = dev->chip_info; | ||||||
| 	struct resource *res0; |  | ||||||
|  |  | ||||||
| 	if (!dev->enabled) | 	if (!dev->enabled) | ||||||
| 		return; | 		return; | ||||||
|  |  | ||||||
| 	switch(dev->path.pnp.device) { | 	switch(dev->path.pnp.device) { | ||||||
| 	case PC87384_SP1: |  | ||||||
| 		res0 = find_resource(dev, PNP_IDX_IO0); |  | ||||||
| 		init_uart8250(res0->base, &conf->com1); |  | ||||||
| 		break; |  | ||||||
| 	case PC87384_SP2: |  | ||||||
| 		res0 = find_resource(dev, PNP_IDX_IO0); |  | ||||||
| 		init_uart8250(res0->base, &conf->com2); |  | ||||||
| 		break; |  | ||||||
|  |  | ||||||
| 	case PC87384_GPIO: | 	case PC87384_GPIO: | ||||||
| 		break; | 		break; | ||||||
| 	} | 	} | ||||||
|   | |||||||
| @@ -26,7 +26,7 @@ extern struct chip_operations superio_nsc_pc87392_ops; | |||||||
| #include <uart8250.h> | #include <uart8250.h> | ||||||
|  |  | ||||||
| struct superio_nsc_pc87392_config { | struct superio_nsc_pc87392_config { | ||||||
| 	struct uart8250 com1, com2; | 	 | ||||||
| }; | }; | ||||||
|  |  | ||||||
| #endif | #endif | ||||||
|   | |||||||
| @@ -31,23 +31,8 @@ | |||||||
|  |  | ||||||
| static void init(device_t dev) | static void init(device_t dev) | ||||||
| { | { | ||||||
| 	struct superio_nsc_pc87392_config *conf = dev->chip_info; |  | ||||||
| 	struct resource *res0; |  | ||||||
|  |  | ||||||
| 	if (!dev->enabled) | 	if (!dev->enabled) | ||||||
| 		return; | 		return; | ||||||
|  |  | ||||||
| 	switch(dev->path.pnp.device) { |  | ||||||
| 	case PC87392_SP1: |  | ||||||
| 		res0 = find_resource(dev, PNP_IDX_IO0); |  | ||||||
| 		init_uart8250(res0->base, &conf->com1); |  | ||||||
| 		break; |  | ||||||
|  |  | ||||||
| 	case PC87392_SP2: |  | ||||||
| 		res0 = find_resource(dev, PNP_IDX_IO0); |  | ||||||
| 		init_uart8250(res0->base, &conf->com2); |  | ||||||
| 		break; |  | ||||||
| 	} |  | ||||||
| } | } | ||||||
|  |  | ||||||
| static struct device_operations ops = { | static struct device_operations ops = { | ||||||
|   | |||||||
| @@ -29,7 +29,7 @@ extern struct chip_operations superio_nsc_pc87417_ops; | |||||||
| #include <uart8250.h> | #include <uart8250.h> | ||||||
|  |  | ||||||
| struct superio_nsc_pc87417_config { | struct superio_nsc_pc87417_config { | ||||||
| 	struct uart8250 com1, com2; | 	 | ||||||
| 	struct pc_keyboard keyboard; | 	struct pc_keyboard keyboard; | ||||||
| }; | }; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -35,20 +35,11 @@ | |||||||
| static void init(device_t dev) | static void init(device_t dev) | ||||||
| { | { | ||||||
| 	struct superio_nsc_pc87417_config *conf = dev->chip_info; | 	struct superio_nsc_pc87417_config *conf = dev->chip_info; | ||||||
| 	struct resource *res0; |  | ||||||
|  |  | ||||||
| 	if (!dev->enabled) | 	if (!dev->enabled) | ||||||
| 		return; | 		return; | ||||||
|  |  | ||||||
| 	switch(dev->path.pnp.device) { | 	switch(dev->path.pnp.device) { | ||||||
| 	case PC87417_SP1: |  | ||||||
| 		res0 = find_resource(dev, PNP_IDX_IO0); |  | ||||||
| 		init_uart8250(res0->base, &conf->com1); |  | ||||||
| 		break; |  | ||||||
| 	case PC87417_SP2: |  | ||||||
| 		res0 = find_resource(dev, PNP_IDX_IO0); |  | ||||||
| 		init_uart8250(res0->base, &conf->com2); |  | ||||||
| 		break; |  | ||||||
| 	case PC87417_KBCK: | 	case PC87417_KBCK: | ||||||
| 		pc_keyboard_init(&conf->keyboard); | 		pc_keyboard_init(&conf->keyboard); | ||||||
| 		break; | 		break; | ||||||
|   | |||||||
| @@ -28,7 +28,7 @@ extern struct chip_operations superio_nsc_pc87427_ops; | |||||||
| #include <uart8250.h> | #include <uart8250.h> | ||||||
|  |  | ||||||
| struct superio_nsc_pc87427_config { | struct superio_nsc_pc87427_config { | ||||||
| 	struct uart8250 com1, com2; | 	 | ||||||
| 	struct pc_keyboard keyboard; | 	struct pc_keyboard keyboard; | ||||||
| }; | }; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -32,20 +32,11 @@ | |||||||
| static void init(device_t dev) | static void init(device_t dev) | ||||||
| { | { | ||||||
| 	struct superio_nsc_pc87427_config *conf = dev->chip_info; | 	struct superio_nsc_pc87427_config *conf = dev->chip_info; | ||||||
| 	struct resource *res0; |  | ||||||
|  |  | ||||||
| 	if (!dev->enabled) | 	if (!dev->enabled) | ||||||
| 		return; | 		return; | ||||||
|  |  | ||||||
| 	switch(dev->path.pnp.device) { | 	switch(dev->path.pnp.device) { | ||||||
| 	case PC87427_SP1: |  | ||||||
| 		res0 = find_resource(dev, PNP_IDX_IO0); |  | ||||||
| 		init_uart8250(res0->base, &conf->com1); |  | ||||||
| 		break; |  | ||||||
| 	case PC87427_SP2: |  | ||||||
| 		res0 = find_resource(dev, PNP_IDX_IO0); |  | ||||||
| 		init_uart8250(res0->base, &conf->com2); |  | ||||||
| 		break; |  | ||||||
| 	case PC87427_KBCK: | 	case PC87427_KBCK: | ||||||
| 		pc_keyboard_init(&conf->keyboard); | 		pc_keyboard_init(&conf->keyboard); | ||||||
| 		break; | 		break; | ||||||
|   | |||||||
| @@ -34,7 +34,7 @@ extern struct chip_operations superio_nsc_pc97307_ops; | |||||||
| #include <uart8250.h> | #include <uart8250.h> | ||||||
|  |  | ||||||
| struct superio_nsc_pc97307_config { | struct superio_nsc_pc97307_config { | ||||||
| 	struct uart8250 com1, com2; | 	 | ||||||
| 	struct pc_keyboard keyboard; | 	struct pc_keyboard keyboard; | ||||||
| }; | }; | ||||||
| #endif | #endif | ||||||
|   | |||||||
| @@ -29,21 +29,12 @@ | |||||||
| static void init(device_t dev) | static void init(device_t dev) | ||||||
| { | { | ||||||
| 	struct superio_nsc_pc97307_config *conf = dev->chip_info; | 	struct superio_nsc_pc97307_config *conf = dev->chip_info; | ||||||
| 	struct resource *res0; |  | ||||||
| 	u8 reg8; | 	u8 reg8; | ||||||
|  |  | ||||||
| 	if (!dev->enabled) | 	if (!dev->enabled) | ||||||
| 		return; | 		return; | ||||||
|  |  | ||||||
| 	switch(dev->path.pnp.device) { | 	switch(dev->path.pnp.device) { | ||||||
| 	case PC97307_SP1: |  | ||||||
| 		res0 = find_resource(dev, PNP_IDX_IO0); |  | ||||||
| 		init_uart8250(res0->base, &conf->com1); |  | ||||||
| 		break; |  | ||||||
| 	case PC97307_SP2: |  | ||||||
| 		res0 = find_resource(dev, PNP_IDX_IO0); |  | ||||||
| 		init_uart8250(res0->base, &conf->com2); |  | ||||||
| 		break; |  | ||||||
| 	case PC97307_KBCK: | 	case PC97307_KBCK: | ||||||
| 		pnp_set_logical_device(dev); | 		pnp_set_logical_device(dev); | ||||||
| 		pnp_set_enable(dev, 0);		   /* Disable keyboard */ | 		pnp_set_enable(dev, 0);		   /* Disable keyboard */ | ||||||
|   | |||||||
| @@ -34,7 +34,7 @@ extern struct chip_operations superio_nsc_pc97317_ops; | |||||||
| #include <uart8250.h> | #include <uart8250.h> | ||||||
|  |  | ||||||
| struct superio_nsc_pc97317_config { | struct superio_nsc_pc97317_config { | ||||||
| 	struct uart8250 com1, com2; | 	 | ||||||
| 	struct pc_keyboard keyboard; | 	struct pc_keyboard keyboard; | ||||||
| }; | }; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -29,20 +29,11 @@ | |||||||
| static void init(device_t dev) | static void init(device_t dev) | ||||||
| { | { | ||||||
| 	struct superio_nsc_pc97317_config *conf = dev->chip_info; | 	struct superio_nsc_pc97317_config *conf = dev->chip_info; | ||||||
| 	struct resource *res0; |  | ||||||
|  |  | ||||||
| 	if (!dev->enabled) | 	if (!dev->enabled) | ||||||
| 		return; | 		return; | ||||||
|  |  | ||||||
| 	switch(dev->path.pnp.device) { | 	switch(dev->path.pnp.device) { | ||||||
| 	case PC97317_SP1: |  | ||||||
| 		res0 = find_resource(dev, PNP_IDX_IO0); |  | ||||||
| 		init_uart8250(res0->base, &conf->com1); |  | ||||||
| 		break; |  | ||||||
| 	case PC97317_SP2: |  | ||||||
| 		res0 = find_resource(dev, PNP_IDX_IO0); |  | ||||||
| 		init_uart8250(res0->base, &conf->com2); |  | ||||||
| 		break; |  | ||||||
| 	case PC97317_KBCK: | 	case PC97317_KBCK: | ||||||
| 		pnp_set_logical_device(dev); | 		pnp_set_logical_device(dev); | ||||||
| 		pnp_set_enable(dev, 0);		   /* Disable keyboard */ | 		pnp_set_enable(dev, 0);		   /* Disable keyboard */ | ||||||
|   | |||||||
| @@ -28,7 +28,7 @@ extern struct chip_operations superio_nuvoton_wpcm450_ops; | |||||||
| #include <uart8250.h> | #include <uart8250.h> | ||||||
|  |  | ||||||
| struct superio_nuvoton_wpcm450_config { | struct superio_nuvoton_wpcm450_config { | ||||||
| 	struct uart8250 com1, com2; | 	 | ||||||
| 	struct pc_keyboard keyboard; | 	struct pc_keyboard keyboard; | ||||||
| }; | }; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -33,20 +33,11 @@ | |||||||
| static void init(device_t dev) | static void init(device_t dev) | ||||||
| { | { | ||||||
| 	struct superio_nuvoton_wpcm450_config *conf = dev->chip_info; | 	struct superio_nuvoton_wpcm450_config *conf = dev->chip_info; | ||||||
| 	struct resource *res0; |  | ||||||
|  |  | ||||||
| 	if (!dev->enabled) | 	if (!dev->enabled) | ||||||
| 		return; | 		return; | ||||||
|  |  | ||||||
| 	switch(dev->path.pnp.device) { | 	switch(dev->path.pnp.device) { | ||||||
| 	case WPCM450_SP1: |  | ||||||
| 		res0 = find_resource(dev, PNP_IDX_IO0); |  | ||||||
| 		init_uart8250(res0->base, &conf->com1); |  | ||||||
| 		break; |  | ||||||
| 	case WPCM450_SP2: |  | ||||||
| 		res0 = find_resource(dev, PNP_IDX_IO0); |  | ||||||
| 		init_uart8250(res0->base, &conf->com2); |  | ||||||
| 		break; |  | ||||||
| 	case WPCM450_KBCK: | 	case WPCM450_KBCK: | ||||||
| 		pc_keyboard_init(&conf->keyboard); | 		pc_keyboard_init(&conf->keyboard); | ||||||
| 		break; | 		break; | ||||||
|   | |||||||
| @@ -28,7 +28,7 @@ | |||||||
| extern struct chip_operations superio_smsc_fdc37m60x_ops; | extern struct chip_operations superio_smsc_fdc37m60x_ops; | ||||||
|  |  | ||||||
| struct superio_smsc_fdc37m60x_config { | struct superio_smsc_fdc37m60x_config { | ||||||
| 	struct uart8250 com1, com2; | 	 | ||||||
| 	struct pc_keyboard keyboard; | 	struct pc_keyboard keyboard; | ||||||
| }; | }; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -29,7 +29,6 @@ | |||||||
| static void init(device_t dev) | static void init(device_t dev) | ||||||
| { | { | ||||||
| 	struct superio_smsc_fdc37m60x_config *conf = dev->chip_info; | 	struct superio_smsc_fdc37m60x_config *conf = dev->chip_info; | ||||||
| 	struct resource *res0; |  | ||||||
|  |  | ||||||
| 	if (!dev->enabled) | 	if (!dev->enabled) | ||||||
| 		return; | 		return; | ||||||
| @@ -39,14 +38,6 @@ static void init(device_t dev) | |||||||
| 		break; | 		break; | ||||||
| 	case FDC37M60X_PP: /* TODO. */ | 	case FDC37M60X_PP: /* TODO. */ | ||||||
| 		break; | 		break; | ||||||
| 	case FDC37M60X_SP1: |  | ||||||
| 		res0 = find_resource(dev, PNP_IDX_IO0); |  | ||||||
| 		init_uart8250(res0->base, &conf->com1); |  | ||||||
| 		break; |  | ||||||
| 	case FDC37M60X_SP2: |  | ||||||
| 		res0 = find_resource(dev, PNP_IDX_IO0); |  | ||||||
| 		init_uart8250(res0->base, &conf->com2); |  | ||||||
| 		break; |  | ||||||
| 	case FDC37M60X_KBCK: | 	case FDC37M60X_KBCK: | ||||||
| 		pc_keyboard_init(&conf->keyboard); | 		pc_keyboard_init(&conf->keyboard); | ||||||
| 		break; | 		break; | ||||||
|   | |||||||
| @@ -27,7 +27,7 @@ | |||||||
| extern struct chip_operations superio_smsc_fdc37n972_ops; | extern struct chip_operations superio_smsc_fdc37n972_ops; | ||||||
|  |  | ||||||
| struct superio_smsc_fdc37n972_config { | struct superio_smsc_fdc37n972_config { | ||||||
| 	struct uart8250 com1, com2; | 	 | ||||||
| 	struct pc_keyboard keyboard; | 	struct pc_keyboard keyboard; | ||||||
| }; | }; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -27,7 +27,7 @@ struct chip_operations; | |||||||
| extern struct chip_operations superio_smsc_kbc1100_ops; | extern struct chip_operations superio_smsc_kbc1100_ops; | ||||||
|  |  | ||||||
| struct superio_smsc_kbc1100_config { | struct superio_smsc_kbc1100_config { | ||||||
| 	struct uart8250 com1, com2; | 	 | ||||||
| 	struct pc_keyboard keyboard; | 	struct pc_keyboard keyboard; | ||||||
| }; | }; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -28,7 +28,7 @@ extern struct chip_operations superio_smsc_lpc47b272_ops; | |||||||
| #include <uart8250.h> | #include <uart8250.h> | ||||||
|  |  | ||||||
| struct superio_smsc_lpc47b272_config { | struct superio_smsc_lpc47b272_config { | ||||||
| 	struct uart8250 com1, com2; | 	 | ||||||
| 	struct pc_keyboard keyboard; | 	struct pc_keyboard keyboard; | ||||||
| }; | }; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -120,20 +120,11 @@ static void lpc47b272_pnp_enable(device_t dev) | |||||||
| static void lpc47b272_init(device_t dev) | static void lpc47b272_init(device_t dev) | ||||||
| { | { | ||||||
| 	struct superio_smsc_lpc47b272_config *conf = dev->chip_info; | 	struct superio_smsc_lpc47b272_config *conf = dev->chip_info; | ||||||
| 	struct resource *res0; |  | ||||||
|  |  | ||||||
| 	if (!dev->enabled) | 	if (!dev->enabled) | ||||||
| 		return; | 		return; | ||||||
|  |  | ||||||
| 	switch(dev->path.pnp.device) { | 	switch(dev->path.pnp.device) { | ||||||
| 	case LPC47B272_SP1: |  | ||||||
| 		res0 = find_resource(dev, PNP_IDX_IO0); |  | ||||||
| 		init_uart8250(res0->base, &conf->com1); |  | ||||||
| 		break; |  | ||||||
| 	case LPC47B272_SP2: |  | ||||||
| 		res0 = find_resource(dev, PNP_IDX_IO0); |  | ||||||
| 		init_uart8250(res0->base, &conf->com2); |  | ||||||
| 		break; |  | ||||||
| 	case LPC47B272_KBC: | 	case LPC47B272_KBC: | ||||||
| 		pc_keyboard_init(&conf->keyboard); | 		pc_keyboard_init(&conf->keyboard); | ||||||
| 		break; | 		break; | ||||||
|   | |||||||
| @@ -30,7 +30,7 @@ extern struct chip_operations superio_smsc_lpc47b397_ops; | |||||||
| #include <uart8250.h> | #include <uart8250.h> | ||||||
|  |  | ||||||
| struct superio_smsc_lpc47b397_config { | struct superio_smsc_lpc47b397_config { | ||||||
| 	struct uart8250 com1, com2; | 	 | ||||||
| 	struct pc_keyboard keyboard; | 	struct pc_keyboard keyboard; | ||||||
| }; | }; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -68,20 +68,11 @@ static void enable_hwm_smbus(device_t dev) | |||||||
| static void lpc47b397_init(device_t dev) | static void lpc47b397_init(device_t dev) | ||||||
| { | { | ||||||
| 	struct superio_smsc_lpc47b397_config *conf = dev->chip_info; | 	struct superio_smsc_lpc47b397_config *conf = dev->chip_info; | ||||||
| 	struct resource *res0; |  | ||||||
|  |  | ||||||
| 	if (!dev->enabled) | 	if (!dev->enabled) | ||||||
| 		return; | 		return; | ||||||
|  |  | ||||||
| 	switch(dev->path.pnp.device) { | 	switch(dev->path.pnp.device) { | ||||||
| 	case LPC47B397_SP1: |  | ||||||
| 		res0 = find_resource(dev, PNP_IDX_IO0); |  | ||||||
| 		init_uart8250(res0->base, &conf->com1); |  | ||||||
| 		break; |  | ||||||
| 	case LPC47B397_SP2: |  | ||||||
| 		res0 = find_resource(dev, PNP_IDX_IO0); |  | ||||||
| 		init_uart8250(res0->base, &conf->com2); |  | ||||||
| 		break; |  | ||||||
| 	case LPC47B397_KBC: | 	case LPC47B397_KBC: | ||||||
| 		pc_keyboard_init(&conf->keyboard); | 		pc_keyboard_init(&conf->keyboard); | ||||||
| 		break; | 		break; | ||||||
|   | |||||||
| @@ -32,7 +32,7 @@ extern struct chip_operations superio_smsc_lpc47m10x_ops; | |||||||
| #include <uart8250.h> | #include <uart8250.h> | ||||||
|  |  | ||||||
| struct superio_smsc_lpc47m10x_config { | struct superio_smsc_lpc47m10x_config { | ||||||
| 	struct uart8250 com1, com2; | 	 | ||||||
| 	struct pc_keyboard keyboard; | 	struct pc_keyboard keyboard; | ||||||
| }; | }; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -118,20 +118,11 @@ static void lpc47m10x_pnp_enable(device_t dev) | |||||||
| static void lpc47m10x_init(device_t dev) | static void lpc47m10x_init(device_t dev) | ||||||
| { | { | ||||||
| 	struct superio_smsc_lpc47m10x_config *conf = dev->chip_info; | 	struct superio_smsc_lpc47m10x_config *conf = dev->chip_info; | ||||||
| 	struct resource *res0; |  | ||||||
|  |  | ||||||
| 	if (!dev->enabled) | 	if (!dev->enabled) | ||||||
| 		return; | 		return; | ||||||
|  |  | ||||||
| 	switch(dev->path.pnp.device) { | 	switch(dev->path.pnp.device) { | ||||||
| 	case LPC47M10X2_SP1: |  | ||||||
| 		res0 = find_resource(dev, PNP_IDX_IO0); |  | ||||||
| 		init_uart8250(res0->base, &conf->com1); |  | ||||||
| 		break; |  | ||||||
| 	case LPC47M10X2_SP2: |  | ||||||
| 		res0 = find_resource(dev, PNP_IDX_IO0); |  | ||||||
| 		init_uart8250(res0->base, &conf->com2); |  | ||||||
| 		break; |  | ||||||
| 	case LPC47M10X2_KBC: | 	case LPC47M10X2_KBC: | ||||||
| 		pc_keyboard_init(&conf->keyboard); | 		pc_keyboard_init(&conf->keyboard); | ||||||
| 		break; | 		break; | ||||||
|   | |||||||
| @@ -27,7 +27,7 @@ extern struct chip_operations superio_smsc_lpc47m15x_ops; | |||||||
| #include <uart8250.h> | #include <uart8250.h> | ||||||
|  |  | ||||||
| struct superio_smsc_lpc47m15x_config { | struct superio_smsc_lpc47m15x_config { | ||||||
| 	struct uart8250 com1, com2; | 	 | ||||||
| 	struct pc_keyboard keyboard; | 	struct pc_keyboard keyboard; | ||||||
| }; | }; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -94,20 +94,11 @@ static void lpc47m15x_pnp_enable(device_t dev) | |||||||
| static void lpc47m15x_init(device_t dev) | static void lpc47m15x_init(device_t dev) | ||||||
| { | { | ||||||
| 	struct superio_smsc_lpc47m15x_config *conf = dev->chip_info; | 	struct superio_smsc_lpc47m15x_config *conf = dev->chip_info; | ||||||
| 	struct resource *res0; |  | ||||||
|  |  | ||||||
| 	if (!dev->enabled) | 	if (!dev->enabled) | ||||||
| 		return; | 		return; | ||||||
|  |  | ||||||
| 	switch(dev->path.pnp.device) { | 	switch(dev->path.pnp.device) { | ||||||
| 	case LPC47M15X_SP1: |  | ||||||
| 		res0 = find_resource(dev, PNP_IDX_IO0); |  | ||||||
| 		init_uart8250(res0->base, &conf->com1); |  | ||||||
| 		break; |  | ||||||
| 	case LPC47M15X_SP2: |  | ||||||
| 		res0 = find_resource(dev, PNP_IDX_IO0); |  | ||||||
| 		init_uart8250(res0->base, &conf->com2); |  | ||||||
| 		break; |  | ||||||
| 	case LPC47M15X_KBC: | 	case LPC47M15X_KBC: | ||||||
| 		pc_keyboard_init(&conf->keyboard); | 		pc_keyboard_init(&conf->keyboard); | ||||||
| 		break; | 		break; | ||||||
|   | |||||||
| @@ -27,7 +27,7 @@ extern struct chip_operations superio_smsc_lpc47n217_ops; | |||||||
| #include <uart8250.h> | #include <uart8250.h> | ||||||
|  |  | ||||||
| struct superio_smsc_lpc47n217_config { | struct superio_smsc_lpc47n217_config { | ||||||
| 	struct uart8250 com1, com2; | 	 | ||||||
| }; | }; | ||||||
|  |  | ||||||
| #endif | #endif | ||||||
|   | |||||||
| @@ -134,21 +134,9 @@ static void lpc47n217_pnp_enable(device_t dev) | |||||||
| static void lpc47n217_init(device_t dev) | static void lpc47n217_init(device_t dev) | ||||||
| { | { | ||||||
| 	struct superio_smsc_lpc47n217_config* conf = dev->chip_info; | 	struct superio_smsc_lpc47n217_config* conf = dev->chip_info; | ||||||
| 	struct resource *res0; |  | ||||||
|  |  | ||||||
| 	if (!dev->enabled) | 	if (!dev->enabled) | ||||||
| 		return; | 		return; | ||||||
|  |  | ||||||
| 	switch(dev->path.pnp.device) { |  | ||||||
| 	case LPC47N217_SP1: |  | ||||||
| 		res0 = find_resource(dev, PNP_IDX_IO0); |  | ||||||
| 		init_uart8250(res0->base, &conf->com1); |  | ||||||
| 		break; |  | ||||||
| 	case LPC47N217_SP2: |  | ||||||
| 		res0 = find_resource(dev, PNP_IDX_IO0); |  | ||||||
| 		init_uart8250(res0->base, &conf->com2); |  | ||||||
| 		break; |  | ||||||
| 	} |  | ||||||
| } | } | ||||||
|  |  | ||||||
| static void lpc47n217_pnp_set_resource(device_t dev, struct resource *resource) | static void lpc47n217_pnp_set_resource(device_t dev, struct resource *resource) | ||||||
|   | |||||||
| @@ -27,7 +27,7 @@ | |||||||
| extern struct chip_operations superio_smsc_lpc47n227_ops; | extern struct chip_operations superio_smsc_lpc47n227_ops; | ||||||
|  |  | ||||||
| struct superio_smsc_lpc47n227_config { | struct superio_smsc_lpc47n227_config { | ||||||
| 	struct uart8250 com1, com2; | 	 | ||||||
| 	struct pc_keyboard keyboard; | 	struct pc_keyboard keyboard; | ||||||
| }; | }; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -131,20 +131,11 @@ void lpc47n227_pnp_enable(device_t dev) | |||||||
| static void lpc47n227_init(device_t dev) | static void lpc47n227_init(device_t dev) | ||||||
| { | { | ||||||
| 	struct superio_smsc_lpc47n227_config *conf = dev->chip_info; | 	struct superio_smsc_lpc47n227_config *conf = dev->chip_info; | ||||||
| 	struct resource *res0; |  | ||||||
|  |  | ||||||
| 	if (!dev->enabled) | 	if (!dev->enabled) | ||||||
| 		return; | 		return; | ||||||
|  |  | ||||||
| 	switch (dev->path.pnp.device) { | 	switch (dev->path.pnp.device) { | ||||||
| 	case LPC47N227_SP1: |  | ||||||
| 		res0 = find_resource(dev, PNP_IDX_IO0); |  | ||||||
| 		init_uart8250(res0->base, &conf->com1); |  | ||||||
| 		break; |  | ||||||
| 	case LPC47N227_SP2: |  | ||||||
| 		res0 = find_resource(dev, PNP_IDX_IO0); |  | ||||||
| 		init_uart8250(res0->base, &conf->com2); |  | ||||||
| 		break; |  | ||||||
| 	case LPC47N227_KBDC: | 	case LPC47N227_KBDC: | ||||||
| 		printk(BIOS_DEBUG, "LPC47N227: Initializing keyboard.\n"); | 		printk(BIOS_DEBUG, "LPC47N227: Initializing keyboard.\n"); | ||||||
| 		pc_keyboard_init(&conf->keyboard); | 		pc_keyboard_init(&conf->keyboard); | ||||||
|   | |||||||
| @@ -27,7 +27,7 @@ | |||||||
| extern struct chip_operations superio_smsc_sio10n268_ops; | extern struct chip_operations superio_smsc_sio10n268_ops; | ||||||
|  |  | ||||||
| struct superio_smsc_sio10n268_config { | struct superio_smsc_sio10n268_config { | ||||||
| 	struct uart8250 com1, com2; | 	 | ||||||
| 	struct pc_keyboard keyboard; | 	struct pc_keyboard keyboard; | ||||||
| }; | }; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -28,7 +28,7 @@ | |||||||
| extern struct chip_operations superio_smsc_smscsuperio_ops; | extern struct chip_operations superio_smsc_smscsuperio_ops; | ||||||
|  |  | ||||||
| struct superio_smsc_smscsuperio_config { | struct superio_smsc_smscsuperio_config { | ||||||
| 	struct uart8250 com1, com2; | 	 | ||||||
| 	struct pc_keyboard keyboard; | 	struct pc_keyboard keyboard; | ||||||
| }; | }; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -205,7 +205,6 @@ static void smsc_pnp_enable(device_t dev) | |||||||
| static void smsc_init(device_t dev) | static void smsc_init(device_t dev) | ||||||
| { | { | ||||||
| 	struct superio_smsc_smscsuperio_config *conf = dev->chip_info; | 	struct superio_smsc_smscsuperio_config *conf = dev->chip_info; | ||||||
| 	struct resource *res0; |  | ||||||
| 	int i, ld; | 	int i, ld; | ||||||
|  |  | ||||||
| 	/* Do not initialize disabled devices. */ | 	/* Do not initialize disabled devices. */ | ||||||
| @@ -223,13 +222,7 @@ static void smsc_init(device_t dev) | |||||||
|  |  | ||||||
| 	/* A Super I/O was found, so initialize the respective device. */ | 	/* A Super I/O was found, so initialize the respective device. */ | ||||||
| 	ld = dev->path.pnp.device; | 	ld = dev->path.pnp.device; | ||||||
| 	if (ld == logical_device_table[i].devs[LD_SP1]) { | 	if (ld == logical_device_table[i].devs[LD_KBC]) { | ||||||
| 		res0 = find_resource(dev, PNP_IDX_IO0); |  | ||||||
| 		init_uart8250(res0->base, &conf->com1); |  | ||||||
| 	} else if (ld == logical_device_table[i].devs[LD_SP2]) { |  | ||||||
| 		res0 = find_resource(dev, PNP_IDX_IO0); |  | ||||||
| 		init_uart8250(res0->base, &conf->com2); |  | ||||||
| 	} else if (ld == logical_device_table[i].devs[LD_KBC]) { |  | ||||||
| 		pc_keyboard_init(&conf->keyboard); | 		pc_keyboard_init(&conf->keyboard); | ||||||
| 	} | 	} | ||||||
| } | } | ||||||
|   | |||||||
| @@ -26,7 +26,7 @@ | |||||||
| extern struct chip_operations superio_via_vt1211_ops; | extern struct chip_operations superio_via_vt1211_ops; | ||||||
|  |  | ||||||
| struct superio_via_vt1211_config { | struct superio_via_vt1211_config { | ||||||
| 	struct uart8250 com1, com2; | 	 | ||||||
| }; | }; | ||||||
|  |  | ||||||
| #endif | #endif | ||||||
|   | |||||||
| @@ -27,7 +27,7 @@ | |||||||
| extern struct chip_operations superio_winbond_w83627dhg_ops; | extern struct chip_operations superio_winbond_w83627dhg_ops; | ||||||
|  |  | ||||||
| struct superio_winbond_w83627dhg_config { | struct superio_winbond_w83627dhg_config { | ||||||
| 	struct uart8250 com1, com2; | 	 | ||||||
| 	struct pc_keyboard keyboard; | 	struct pc_keyboard keyboard; | ||||||
| }; | }; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -40,20 +40,11 @@ static void pnp_exit_ext_func_mode(device_t dev) | |||||||
| static void w83627dhg_init(device_t dev) | static void w83627dhg_init(device_t dev) | ||||||
| { | { | ||||||
| 	struct superio_winbond_w83627dhg_config *conf = dev->chip_info; | 	struct superio_winbond_w83627dhg_config *conf = dev->chip_info; | ||||||
| 	struct resource *res0; |  | ||||||
|  |  | ||||||
| 	if (!dev->enabled) | 	if (!dev->enabled) | ||||||
| 		return; | 		return; | ||||||
|  |  | ||||||
| 	switch(dev->path.pnp.device) { | 	switch(dev->path.pnp.device) { | ||||||
| 	case W83627DHG_SP1: |  | ||||||
| 		res0 = find_resource(dev, PNP_IDX_IO0); |  | ||||||
| 		init_uart8250(res0->base, &conf->com1); |  | ||||||
| 		break; |  | ||||||
| 	case W83627DHG_SP2: |  | ||||||
| 		res0 = find_resource(dev, PNP_IDX_IO0); |  | ||||||
| 		init_uart8250(res0->base, &conf->com2); |  | ||||||
| 		break; |  | ||||||
| 	case W83627DHG_KBC: | 	case W83627DHG_KBC: | ||||||
| 		pc_keyboard_init(&conf->keyboard); | 		pc_keyboard_init(&conf->keyboard); | ||||||
| 		break; | 		break; | ||||||
|   | |||||||
| @@ -28,7 +28,7 @@ | |||||||
| extern struct chip_operations superio_winbond_w83627ehg_ops; | extern struct chip_operations superio_winbond_w83627ehg_ops; | ||||||
|  |  | ||||||
| struct superio_winbond_w83627ehg_config { | struct superio_winbond_w83627ehg_config { | ||||||
| 	struct uart8250 com1, com2; | 	 | ||||||
| 	struct pc_keyboard keyboard; | 	struct pc_keyboard keyboard; | ||||||
| }; | }; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -114,14 +114,6 @@ static void w83627ehg_init(device_t dev) | |||||||
| 		return; | 		return; | ||||||
|  |  | ||||||
| 	switch(dev->path.pnp.device) { | 	switch(dev->path.pnp.device) { | ||||||
| 	case W83627EHG_SP1: |  | ||||||
| 		res0 = find_resource(dev, PNP_IDX_IO0); |  | ||||||
| 		init_uart8250(res0->base, &conf->com1); |  | ||||||
| 		break; |  | ||||||
| 	case W83627EHG_SP2: |  | ||||||
| 		res0 = find_resource(dev, PNP_IDX_IO0); |  | ||||||
| 		init_uart8250(res0->base, &conf->com2); |  | ||||||
| 		break; |  | ||||||
| 	case W83627EHG_KBC: | 	case W83627EHG_KBC: | ||||||
| 		pc_keyboard_init(&conf->keyboard); | 		pc_keyboard_init(&conf->keyboard); | ||||||
| 		break; | 		break; | ||||||
|   | |||||||
| @@ -29,7 +29,7 @@ | |||||||
| extern struct chip_operations superio_winbond_w83627hf_ops; | extern struct chip_operations superio_winbond_w83627hf_ops; | ||||||
|  |  | ||||||
| struct superio_winbond_w83627hf_config { | struct superio_winbond_w83627hf_config { | ||||||
| 	struct uart8250 com1, com2; | 	 | ||||||
| 	struct pc_keyboard keyboard; | 	struct pc_keyboard keyboard; | ||||||
| }; | }; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -135,14 +135,6 @@ static void w83627hf_init(device_t dev) | |||||||
| 		return; | 		return; | ||||||
|  |  | ||||||
| 	switch(dev->path.pnp.device) { | 	switch(dev->path.pnp.device) { | ||||||
| 	case W83627HF_SP1: |  | ||||||
| 		res0 = find_resource(dev, PNP_IDX_IO0); |  | ||||||
| 		init_uart8250(res0->base, &conf->com1); |  | ||||||
| 		break; |  | ||||||
| 	case W83627HF_SP2: |  | ||||||
| 		res0 = find_resource(dev, PNP_IDX_IO0); |  | ||||||
| 		init_uart8250(res0->base, &conf->com2); |  | ||||||
| 		break; |  | ||||||
| 	case W83627HF_KBC: | 	case W83627HF_KBC: | ||||||
| 		pc_keyboard_init(&conf->keyboard); | 		pc_keyboard_init(&conf->keyboard); | ||||||
| 		break; | 		break; | ||||||
|   | |||||||
| @@ -29,7 +29,7 @@ | |||||||
| extern struct chip_operations superio_winbond_w83627thg_ops; | extern struct chip_operations superio_winbond_w83627thg_ops; | ||||||
|  |  | ||||||
| struct superio_winbond_w83627thg_config { | struct superio_winbond_w83627thg_config { | ||||||
| 	struct uart8250 com1, com2; | 	 | ||||||
| 	struct pc_keyboard keyboard; | 	struct pc_keyboard keyboard; | ||||||
| }; | }; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -45,20 +45,11 @@ static void w83627thg_exit_ext_func_mode(device_t dev) | |||||||
| static void w83627thg_init(device_t dev) | static void w83627thg_init(device_t dev) | ||||||
| { | { | ||||||
| 	struct superio_winbond_w83627thg_config *conf = dev->chip_info; | 	struct superio_winbond_w83627thg_config *conf = dev->chip_info; | ||||||
| 	struct resource *res0; |  | ||||||
|  |  | ||||||
| 	if (!dev->enabled) | 	if (!dev->enabled) | ||||||
| 		return; | 		return; | ||||||
|  |  | ||||||
| 	switch(dev->path.pnp.device) { | 	switch(dev->path.pnp.device) { | ||||||
| 	case W83627THG_SP1: |  | ||||||
| 		res0 = find_resource(dev, PNP_IDX_IO0); |  | ||||||
| 		init_uart8250(res0->base, &conf->com1); |  | ||||||
| 		break; |  | ||||||
| 	case W83627THG_SP2: |  | ||||||
| 		res0 = find_resource(dev, PNP_IDX_IO0); |  | ||||||
| 		init_uart8250(res0->base, &conf->com2); |  | ||||||
| 		break; |  | ||||||
| 	case W83627THG_KBC: | 	case W83627THG_KBC: | ||||||
| 		pc_keyboard_init(&conf->keyboard); | 		pc_keyboard_init(&conf->keyboard); | ||||||
| 		break; | 		break; | ||||||
|   | |||||||
| @@ -27,7 +27,7 @@ | |||||||
| extern struct chip_operations superio_winbond_w83627uhg_ops; | extern struct chip_operations superio_winbond_w83627uhg_ops; | ||||||
|  |  | ||||||
| struct superio_winbond_w83627uhg_config { | struct superio_winbond_w83627uhg_config { | ||||||
| 	struct uart8250 com1, com2, com3, com4, com5, com6; | 	 | ||||||
| 	struct pc_keyboard keyboard; | 	struct pc_keyboard keyboard; | ||||||
| }; | }; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -73,41 +73,28 @@ static void set_uart_clock_source(device_t dev, u8 uart_clock) | |||||||
| static void w83627uhg_init(device_t dev) | static void w83627uhg_init(device_t dev) | ||||||
| { | { | ||||||
| 	struct superio_winbond_w83627uhg_config *conf = dev->chip_info; | 	struct superio_winbond_w83627uhg_config *conf = dev->chip_info; | ||||||
| 	struct resource *res0; |  | ||||||
|  |  | ||||||
| 	if (!dev->enabled) | 	if (!dev->enabled) | ||||||
| 		return; | 		return; | ||||||
|  |  | ||||||
| 	switch(dev->path.pnp.device) { | 	switch(dev->path.pnp.device) { | ||||||
| 	case W83627UHG_SP1: | 	case W83627UHG_SP1: | ||||||
| 		res0 = find_resource(dev, PNP_IDX_IO0); |  | ||||||
| 		/* set_uart_clock_source(dev, 0); */ | 		/* set_uart_clock_source(dev, 0); */ | ||||||
| 		init_uart8250(res0->base, &conf->com1); |  | ||||||
| 		break; | 		break; | ||||||
| 	case W83627UHG_SP2: | 	case W83627UHG_SP2: | ||||||
| 		res0 = find_resource(dev, PNP_IDX_IO0); |  | ||||||
| 		/* set_uart_clock_source(dev, 0); */ | 		/* set_uart_clock_source(dev, 0); */ | ||||||
| 		init_uart8250(res0->base, &conf->com2); |  | ||||||
| 		break; | 		break; | ||||||
| 	case W83627UHG_SP3: | 	case W83627UHG_SP3: | ||||||
| 		res0 = find_resource(dev, PNP_IDX_IO0); |  | ||||||
| 		/* set_uart_clock_source(dev, 0); */ | 		/* set_uart_clock_source(dev, 0); */ | ||||||
| 		init_uart8250(res0->base, &conf->com3); |  | ||||||
| 		break; | 		break; | ||||||
| 	case W83627UHG_SP4: | 	case W83627UHG_SP4: | ||||||
| 		res0 = find_resource(dev, PNP_IDX_IO0); |  | ||||||
| 		/* set_uart_clock_source(dev, 0); */ | 		/* set_uart_clock_source(dev, 0); */ | ||||||
| 		init_uart8250(res0->base, &conf->com4); |  | ||||||
| 		break; | 		break; | ||||||
| 	case W83627UHG_SP5: | 	case W83627UHG_SP5: | ||||||
| 		res0 = find_resource(dev, PNP_IDX_IO0); |  | ||||||
| 		/* set_uart_clock_source(dev, 0); */ | 		/* set_uart_clock_source(dev, 0); */ | ||||||
| 		init_uart8250(res0->base, &conf->com5); |  | ||||||
| 		break; | 		break; | ||||||
| 	case W83627UHG_SP6: | 	case W83627UHG_SP6: | ||||||
| 		res0 = find_resource(dev, PNP_IDX_IO0); |  | ||||||
| 		/* set_uart_clock_source(dev, 0); */ | 		/* set_uart_clock_source(dev, 0); */ | ||||||
| 		init_uart8250(res0->base, &conf->com6); |  | ||||||
| 		break; | 		break; | ||||||
| 	case W83627UHG_KBC: | 	case W83627UHG_KBC: | ||||||
| 		pc_keyboard_init(&conf->keyboard); | 		pc_keyboard_init(&conf->keyboard); | ||||||
|   | |||||||
| @@ -26,7 +26,7 @@ | |||||||
| extern struct chip_operations superio_winbond_w83697hf_ops; | extern struct chip_operations superio_winbond_w83697hf_ops; | ||||||
|  |  | ||||||
| struct superio_winbond_w83697hf_config { | struct superio_winbond_w83697hf_config { | ||||||
| 	struct uart8250 com1, com2; | 	 | ||||||
| }; | }; | ||||||
|  |  | ||||||
| #endif | #endif | ||||||
|   | |||||||
| @@ -43,22 +43,8 @@ static void pnp_exit_ext_func_mode(device_t dev) | |||||||
|  |  | ||||||
| static void w83697hf_init(device_t dev) | static void w83697hf_init(device_t dev) | ||||||
| { | { | ||||||
| 	struct superio_winbond_w83697hf_config *conf = dev->chip_info; |  | ||||||
| 	struct resource *res0; |  | ||||||
|  |  | ||||||
| 	if (!dev->enabled) | 	if (!dev->enabled) | ||||||
| 		return; | 		return; | ||||||
|  |  | ||||||
| 	switch(dev->path.pnp.device) { |  | ||||||
| 	case W83697HF_SP1: |  | ||||||
| 		res0 = find_resource(dev, PNP_IDX_IO0); |  | ||||||
| 		init_uart8250(res0->base, &conf->com1); |  | ||||||
| 		break; |  | ||||||
| 	case W83697HF_SP2: |  | ||||||
| 		res0 = find_resource(dev, PNP_IDX_IO0); |  | ||||||
| 		init_uart8250(res0->base, &conf->com2); |  | ||||||
| 		break; |  | ||||||
| 	} |  | ||||||
| } | } | ||||||
|  |  | ||||||
| static void w83697hf_pnp_set_resources(device_t dev) | static void w83697hf_pnp_set_resources(device_t dev) | ||||||
|   | |||||||
| @@ -27,7 +27,7 @@ | |||||||
| extern struct chip_operations superio_winbond_w83977f_ops; | extern struct chip_operations superio_winbond_w83977f_ops; | ||||||
|  |  | ||||||
| struct superio_winbond_w83977f_config { | struct superio_winbond_w83977f_config { | ||||||
| 	struct uart8250 com1, com2; | 	 | ||||||
| 	struct pc_keyboard keyboard; | 	struct pc_keyboard keyboard; | ||||||
| }; | }; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -44,20 +44,11 @@ static void w83977f_exit_ext_func_mode(device_t dev) | |||||||
| static void w83977f_init(device_t dev) | static void w83977f_init(device_t dev) | ||||||
| { | { | ||||||
| 	struct superio_winbond_w83977f_config *conf = dev->chip_info; | 	struct superio_winbond_w83977f_config *conf = dev->chip_info; | ||||||
| 	struct resource *res0; |  | ||||||
|  |  | ||||||
| 	if (!dev->enabled) | 	if (!dev->enabled) | ||||||
| 		return; | 		return; | ||||||
|  |  | ||||||
| 	switch(dev->path.pnp.device) { | 	switch(dev->path.pnp.device) { | ||||||
| 	case W83977F_SP1: |  | ||||||
| 		res0 = find_resource(dev, PNP_IDX_IO0); |  | ||||||
| 		init_uart8250(res0->base, &conf->com1); |  | ||||||
| 		break; |  | ||||||
| 	case W83977F_SP2: |  | ||||||
| 		res0 = find_resource(dev, PNP_IDX_IO0); |  | ||||||
| 		init_uart8250(res0->base, &conf->com2); |  | ||||||
| 		break; |  | ||||||
| 	case W83977F_KBC: | 	case W83977F_KBC: | ||||||
| 		pc_keyboard_init(&conf->keyboard); | 		pc_keyboard_init(&conf->keyboard); | ||||||
| 		break; | 		break; | ||||||
|   | |||||||
| @@ -29,7 +29,7 @@ | |||||||
| extern struct chip_operations superio_winbond_w83977tf_ops; | extern struct chip_operations superio_winbond_w83977tf_ops; | ||||||
|  |  | ||||||
| struct superio_winbond_w83977tf_config { | struct superio_winbond_w83977tf_config { | ||||||
| 	struct uart8250 com1, com2; | 	 | ||||||
| 	struct pc_keyboard keyboard; | 	struct pc_keyboard keyboard; | ||||||
| }; | }; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -46,20 +46,11 @@ static void w83977tf_exit_ext_func_mode(device_t dev) | |||||||
| static void w83977tf_init(device_t dev) | static void w83977tf_init(device_t dev) | ||||||
| { | { | ||||||
| 	struct superio_winbond_w83977tf_config *conf = dev->chip_info; | 	struct superio_winbond_w83977tf_config *conf = dev->chip_info; | ||||||
| 	struct resource *res0; |  | ||||||
|  |  | ||||||
| 	if (!dev->enabled) | 	if (!dev->enabled) | ||||||
| 		return; | 		return; | ||||||
|  |  | ||||||
| 	switch(dev->path.pnp.device) { | 	switch(dev->path.pnp.device) { | ||||||
| 	case W83977TF_SP1: |  | ||||||
| 		res0 = find_resource(dev, PNP_IDX_IO0); |  | ||||||
| 		init_uart8250(res0->base, &conf->com1); |  | ||||||
| 		break; |  | ||||||
| 	case W83977TF_SP2: |  | ||||||
| 		res0 = find_resource(dev, PNP_IDX_IO0); |  | ||||||
| 		init_uart8250(res0->base, &conf->com2); |  | ||||||
| 		break; |  | ||||||
| 	case W83977TF_KBC: | 	case W83977TF_KBC: | ||||||
| 		pc_keyboard_init(&conf->keyboard); | 		pc_keyboard_init(&conf->keyboard); | ||||||
| 		break; | 		break; | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user