n. Brit. sl. - Nonsense (20th c: orig. unkn.) - The Oxford English Dictionary
Although cited as one of those quintessential verbal Englishisms, codswallop has only been officially recorded as having been used in printed literature from the 1960s onwards. Scholars who would like to believe in the word's antiquity trace it back to Anglo-Saxon English, from Cod, meaning 'bag' and wallop, to hit hard. It is thought it describes a sharp blow to the testicles.
However, a more plausible argument comes from the definition originally printed in Brewer's Dictionary of Phrase and Fable. During the 1800s a popular fizzy soft drink was marketed by a Hiram Codd of Suffolk with an innovative design for the bottle, involving a pressurised marble placed within the neck to seal it. The drink was unremarkable, however ingenious the design of its container, and was sneered at by those who preferred alcoholic beverages. It became known as Codd's Wallop, 'wallop' being a derogatory term for beer. As time progressed the phrase stopped being exclusive to naff fizzy drinks and became associated with anything seen as rubbish or ridiculous.
This is a rather neat explanation for the phrase, but there is a slight discrepancy as there is a good ninety or so years in between the supposed origins of the word and it turning up in literature.
Bunkum? You decide.