Skip to contentSkip to conversation

input: Fix CLOCK_TICK_RATE usage ... [8/13]

PATCH David Mosberger 1 participant 1 message Jun 18, 2003

lore
Share & tools
lore
#0 lore raw
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line · Hollis Blanchard
Quoted 9 lines · David Mosberger
Quoted 9 lines

#ifdef CONFIG_LEGACY_HW

# define PIT_FREQ	1193182
# define LATCH		((CLOCK_TICK_RATE + HZ/2) / HZ)
#endif

This way, machines that support legacy hardware can define CONFIG_LEGACY_HW and on others, the macro can be left undefined, so that any attempt to compile drivers requiring legacy hw would fail to compile upfront (much better than accessing random ports!).

Hollis> Is "having legacy hardware" an all-or-nothing condition for you? If Hollis> not, a CONFIG_LEGACY_PIT might be more appropriate...

I believe it is, though I'm not entirely certain about Intel's Tiger platform. If more fine-grained distinction really is needed, I suspect we'd rather want something called CONFIG_8259_PIT. Might be a good idea to do this for all legacy devices.

	--david